public void addCalendarItem(GameObject Container, calendarItem infoItem) { GameObject newMenu = Instantiate(infoItemCalendar, new Vector3(0, 0, 0), new Quaternion(0, 0, 0, 0)) as GameObject; CalendarFill fillScript = newMenu.GetComponent <CalendarFill> (); fillScript.FillCalendar(infoItem.MonthName, infoItem.FirstDayPos, infoItem.DaysInMonth, infoItem.SelectedDays); FillItemRectTransform(newMenu.GetComponent <RectTransform> (), infoItem.Height, Container.transform); }
private calendarItem AddCalendarItem(List <uItem> ItemList, string MonthName, int FirstDayPos, int DayInMonth, List <int> SelectedDays, float Height) { calendarItem new_item = new calendarItem(MonthName, FirstDayPos, DayInMonth, SelectedDays, Height); ItemList.Add(new_item); return(new_item); }
private void fillNextContainer(List <uItem> Items, GameObject NextContainer) { for (int itemIndex = 0; itemIndex < Items.Count; itemIndex++) { if (Items[itemIndex] is subMenuItemExtra) { subMenuItemExtra smItem = Items[itemIndex] as subMenuItemExtra; addSubMenu(NextContainer, smItem); } if (Items[itemIndex] is subMenuItemSingle) { subMenuItemSingle smItem = Items[itemIndex] as subMenuItemSingle; addSubMenu2(NextContainer, smItem); } if (Items[itemIndex] is callInfoItem) { callInfoItem iItem = Items[itemIndex] as callInfoItem; addInfoPhoneNumber(NextContainer, iItem); } if (Items[itemIndex] is inetLinkItem) { inetLinkItem iItem = Items[itemIndex] as inetLinkItem; addUrlItem(NextContainer, iItem); } if (Items[itemIndex] is calendarItem) { calendarItem iItem = Items[itemIndex] as calendarItem; addCalendarItem(NextContainer, iItem); } if (Items[itemIndex] is tableItem) { tableItem iItem = Items[itemIndex] as tableItem; addTableItem(NextContainer, iItem); } if (Items[itemIndex] is textInfoItem) { textInfoItem iItem = Items[itemIndex] as textInfoItem; addTextInfoItem(NextContainer, iItem); } if (Items[itemIndex] is mapItem) { mapItem iItem = Items[itemIndex] as mapItem; addMapItem(NextContainer, iItem); } } }