// Use this for initialization public void initFlatCalendar() { // Getting ui references btn_nextMonth = GameObject.Find("Right_btn"); btn_prevMonth = GameObject.Find("Left_btn"); btn_calendar = GameObject.Find("Calendar_Btn"); label_year = GameObject.Find("Year"); label_month = GameObject.Find("Month"); label_dayOfWeek = GameObject.Find("Day_Title1"); label_dayNumber = GameObject.Find("Day_Title2"); label_numberEvents = GameObject.Find("NumberEvents"); // Add Event Listeners添加事件监听器 addEventsListener(); // Apply UI Color style应用UI颜色样式 FlatCalendarStyle.changeUIStyle(current_UiStyle); // Set current time设置当前时间 setCurrentTime(); // Initialize event list初始化事件列表 events_list = new Dictionary <int, Dictionary <int, Dictionary <int, List <EventObj> > > >(); // Update Calendar with Current Data用当前数据更新日历 updateCalendar(currentTime.month, currentTime.year); // Mark Current Day马克目前天 markSelectionDay(currentTime.day); // Update Label Event 更新标签事件 updateUiLabelEvents(currentTime.year, currentTime.month, currentTime.day); }
public override void OnInspectorGUI() { serializedObject.Update(); uiStyle.intValue = EditorGUILayout.Popup(uiStyle.intValue, guil); // UI STYLE CHOICE FlatCalendarStyle.changeUIStyle(uiStyle.intValue); serializedObject.ApplyModifiedProperties(); }
// Use this for initialization public void initFlatCalendar() { // Getting ui references btn_nextMonth = GameObject.Find("Right_btn"); btn_prevMonth = GameObject.Find("Left_btn"); btn_calendar = GameObject.Find("Calendar_Btn"); label_year = GameObject.Find("Year"); label_month = GameObject.Find("Month"); label_dayOfWeek = GameObject.Find("Day_Title1"); label_dayNumber = GameObject.Find("Day_Title2"); label_numberEvents = GameObject.Find("NumberEvents"); _eventField = GameObject.Find("EventView"); // Add Event Listeners addEventsListener(); // Apply UI Color style FlatCalendarStyle.changeUIStyle(current_UiStyle); // Set current time setCurrentTime(); // Initialize event list events_list = new Dictionary <int, Dictionary <int, Dictionary <int, List <EventObj> > > >(); // Update Calendar with Current Data updateCalendar(currentTime.month, currentTime.year); // Mark Current Day markSelectionDay(currentTime.day); // Update Label Event updateUiLabelEvents(currentTime.year, currentTime.month, currentTime.day); evtListener_GoToNowday(); }
//public void installDemoData() //{ // addEvent(2016,3,7, new EventObj("Event","Description")); // addEvent(2016,3,7, new EventObj("Event","Description")); // addEvent(2016,3,10, new EventObj("Event","Description")); // addEvent(2016,3,22, new EventObj("Event","Description")); // addEvent(2016,4,5, new EventObj("Event","Description")); // addEvent(2016,4,5, new EventObj("Event","Description")); // addEvent(2016,4,5, new EventObj("Event","Description")); // addEvent(2016,4,15, new EventObj("Event","Description")); // addEvent(2016,4,22, new EventObj("Event","Description")); // addEvent(2016,5,1, new EventObj("Event","Description")); // addEvent(2016,5,2, new EventObj("Event","Description")); // addEvent(2016,5,3, new EventObj("Event","Description")); // addEvent(2016,5,15, new EventObj("Event","Description")); // addEvent(2016,6,2, new EventObj("Event","Description")); // addEvent(2016,6,3, new EventObj("Event","Description")); // addEvent(2016,6,4, new EventObj("Event","Description")); // addEvent(2016,6,22, new EventObj("Event","Description")); // //updateCalendar(currentTime.month,currentTime.year); // //markSelectionDay(currentTime.day); //} public void setUIStyle(int style) { current_UiStyle = style; FlatCalendarStyle.changeUIStyle(current_UiStyle); }