Merged in sushanta1991/unity-ui-extensions/sushanta1991/scrollingcalendarcs-edited-online-with-b-1474969966846 (pull request #28)

Child nodes of Months, Years and Days Scroll rect were not visible, Added fix for the same.

--HG--
branch : develop_5.3
release
Simon Jackson 2016-10-10 18:18:18 +01:00
commit 55a54816ec
1 changed files with 3 additions and 3 deletions

View File

@ -58,7 +58,7 @@ public class ScrollingCalendar : MonoBehaviour
arrayYears[i] = 1900 + i; arrayYears[i] = 1900 + i;
GameObject clone = (GameObject)Instantiate(yearsButtonPrefab, new Vector3(0, i*80, 0), Quaternion.Euler(new Vector3(0, 0, 0))) as GameObject; GameObject clone = (GameObject)Instantiate(yearsButtonPrefab, new Vector3(0, i*80, 0), Quaternion.Euler(new Vector3(0, 0, 0))) as GameObject;
clone.transform.SetParent(yearsScrollingPanel); clone.transform.SetParent(yearsScrollingPanel,false);
clone.transform.localScale = new Vector3(1, 1, 1); clone.transform.localScale = new Vector3(1, 1, 1);
clone.GetComponentInChildren<Text>().text = "" + arrayYears[i]; clone.GetComponentInChildren<Text>().text = "" + arrayYears[i];
clone.name = "Year_" + arrayYears[i]; clone.name = "Year_" + arrayYears[i];
@ -81,7 +81,7 @@ public class ScrollingCalendar : MonoBehaviour
months[i] = i; months[i] = i;
GameObject clone = (GameObject)Instantiate(monthsButtonPrefab, new Vector3(0, i * 80, 0), Quaternion.Euler(new Vector3(0, 0, 0))) as GameObject; GameObject clone = (GameObject)Instantiate(monthsButtonPrefab, new Vector3(0, i * 80, 0), Quaternion.Euler(new Vector3(0, 0, 0))) as GameObject;
clone.transform.SetParent(monthsScrollingPanel); clone.transform.SetParent(monthsScrollingPanel,false);
clone.transform.localScale = new Vector3(1, 1, 1); clone.transform.localScale = new Vector3(1, 1, 1);
switch(i) switch(i)
@ -140,7 +140,7 @@ public class ScrollingCalendar : MonoBehaviour
{ {
days[i] = i+1; days[i] = i+1;
GameObject clone = (GameObject)Instantiate(daysButtonPrefab, new Vector3(0, i * 80, 0), Quaternion.Euler(new Vector3(0, 0, 0))) as GameObject; GameObject clone = (GameObject)Instantiate(daysButtonPrefab, new Vector3(0, i * 80, 0), Quaternion.Euler(new Vector3(0, 0, 0))) as GameObject;
clone.transform.SetParent(daysScrollingPanel); clone.transform.SetParent(daysScrollingPanel,false);
clone.transform.localScale = new Vector3(1, 1, 1); clone.transform.localScale = new Vector3(1, 1, 1);
clone.GetComponentInChildren<Text>().text = "" + days[i]; clone.GetComponentInChildren<Text>().text = "" + days[i];
clone.name = "Day_" + days[i]; clone.name = "Day_" + days[i];