public void ChangeCalendar(int i) { Dictionary <string, Events> event_list = null; _controller.CurrentGroup = i; //제목설정 if (i == -1) { calendarName.text = "내 캘린더"; event_list = _controller._user.events_list; } else { calendarName.text = _controller.group_list[i].name; event_list = _controller.group_list[i].events_list; } cal.removeAllCalendarEvents(); //이전꺼 지우기 //Debug.Log("count= " + event_list.Count); foreach (KeyValuePair <string, Events> items in event_list) { Events item = items.Value; cal.addEvent(item.year, item.month, item.day, new FlatCalendar.EventObj(items.Key, item.title, item.description, item.hour, item.min, item.place)); } cal.setCurrentTime(); cal.evtListener_GoToNowday(); //cal.updateUiLabelEvents(cal.currentTime.year, cal.currentTime.month, cal.currentTime.day); }
public static void changeUIStyle(int style) { // ====================================================== // =================== GREEN SEA ======================== // ====================================================== if (style == (int)FlatCalendarStyle.COLORS_TYPE.GREEN_SEA) { color_header = new Color(0.0f / 255.0f, 112.0f / 255.0f, 113.0f / 255.0f, 255.0f / 255.0f); color_subheader = new Color(255.0f / 255.0f, 255.0f / 255.0f, 255.0f / 255.0f, 100.0f / 255.0f); color_body = new Color(0.0f / 255.0f, 125.0f / 255.0f, 126.0f / 255.0f, 255.0f / 255.0f); color_footer = new Color(67.0f / 255.0f, 77.0f / 255.0f, 87.0f / 255.0f, 255.0f / 255.0f); color_dayTextNormal = new Color(255.0f / 255.0f, 255.0f / 255.0f, 255.0f / 255.0f, 255.0f / 255.0f); color_dayTextEvent = new Color(0.0f / 255.0f, 112.0f / 255.0f, 113.0f / 255.0f, 255.0f / 255.0f); color_bubbleEvent = new Color(255.0f / 255.0f, 255.0f / 255.0f, 255.0f / 255.0f, 255.0f / 255.0f); color_bubbleSelectionMarker = new Color(255.0f / 255.0f, 255.0f / 255.0f, 255.0f / 255.0f, 255.0f / 255.0f); color_numberEvent = new Color(238.0f / 255.0f, 105.0f / 255.0f, 105.0f / 255.0f, 255.0f / 255.0f); color_year = new Color(255.0f / 255.0f, 255.0f / 255.0f, 255.0f / 255.0f, 255.0f / 255.0f); color_month = new Color(255.0f / 255.0f, 255.0f / 255.0f, 255.0f / 255.0f, 255.0f / 255.0f); color_day = new Color(255.0f / 255.0f, 255.0f / 255.0f, 255.0f / 255.0f, 255.0f / 255.0f);; color_dayOfWeek = new Color(255.0f / 255.0f, 255.0f / 255.0f, 255.0f / 255.0f, 255.0f / 255.0f); color_Events = new Color(255.0f / 255.0f, 255.0f / 255.0f, 255.0f / 255.0f, 255.0f / 255.0f); color_ButtonRight = new Color(255.0f / 255.0f, 255.0f / 255.0f, 255.0f / 255.0f, 255.0f / 255.0f); color_ButtonLeft = new Color(255.0f / 255.0f, 255.0f / 255.0f, 255.0f / 255.0f, 255.0f / 255.0f); color_Home = new Color(255.0f / 255.0f, 255.0f / 255.0f, 255.0f / 255.0f, 255.0f / 255.0f); } // ====================================================== // =================== RED CARPET ======================= // ====================================================== if (style == (int)FlatCalendarStyle.COLORS_TYPE.RED_CARPET) { color_header = new Color(210.0f / 255.0f, 26.0f / 255.0f, 53.0f / 255.0f, 255.0f / 255.0f); color_subheader = new Color(122.0f / 255.0f, 0.0f / 255.0f, 0.0f / 255.0f, 100.0f / 255.0f); color_body = new Color(184.0f / 255.0f, 28.0f / 255.0f, 62.0f / 255.0f, 255.0f / 255.0f); color_footer = new Color(67.0f / 255.0f, 77.0f / 255.0f, 87.0f / 255.0f, 255.0f / 255.0f); color_dayTextNormal = new Color(255.0f / 255.0f, 255.0f / 255.0f, 255.0f / 255.0f, 255.0f / 255.0f); color_dayTextEvent = new Color(210.0f / 255.0f, 26.0f / 255.0f, 53.0f / 255.0f, 255.0f / 255.0f); color_bubbleEvent = new Color(255.0f / 255.0f, 255.0f / 255.0f, 255.0f / 255.0f, 255.0f / 255.0f); color_bubbleSelectionMarker = new Color(255.0f / 255.0f, 255.0f / 255.0f, 255.0f / 255.0f, 255.0f / 255.0f); color_numberEvent = new Color(238.0f / 255.0f, 105.0f / 255.0f, 105.0f / 255.0f, 255.0f / 255.0f); color_year = new Color(255.0f / 255.0f, 255.0f / 255.0f, 255.0f / 255.0f, 255.0f / 255.0f); color_month = new Color(255.0f / 255.0f, 255.0f / 255.0f, 255.0f / 255.0f, 255.0f / 255.0f); color_day = new Color(255.0f / 255.0f, 255.0f / 255.0f, 255.0f / 255.0f, 255.0f / 255.0f);; color_dayOfWeek = new Color(255.0f / 255.0f, 255.0f / 255.0f, 255.0f / 255.0f, 255.0f / 255.0f); color_Events = new Color(255.0f / 255.0f, 255.0f / 255.0f, 255.0f / 255.0f, 255.0f / 255.0f); color_ButtonRight = new Color(255.0f / 255.0f, 255.0f / 255.0f, 255.0f / 255.0f, 255.0f / 255.0f); color_ButtonLeft = new Color(255.0f / 255.0f, 255.0f / 255.0f, 255.0f / 255.0f, 255.0f / 255.0f); color_Home = new Color(255.0f / 255.0f, 255.0f / 255.0f, 255.0f / 255.0f, 255.0f / 255.0f); } // ====================================================== // =================== ORANGE JUICE ===================== // ====================================================== if (style == (int)FlatCalendarStyle.COLORS_TYPE.ORANGE_JUICE) { color_header = new Color(255.0f / 255.0f, 108.0f / 255.0f, 28.0f / 255.0f, 255.0f / 255.0f); color_subheader = new Color(160.0f / 255.0f, 193.0f / 255.0f, 83.0f / 255.0f, 255.0f / 255.0f); color_body = new Color(240.0f / 255.0f, 89.0f / 255.0f, 7.0f / 255.0f, 255.0f / 255.0f); color_footer = new Color(67.0f / 255.0f, 77.0f / 255.0f, 87.0f / 255.0f, 255.0f / 255.0f); color_dayTextNormal = new Color(255.0f / 255.0f, 255.0f / 255.0f, 255.0f / 255.0f, 255.0f / 255.0f); color_dayTextEvent = new Color(255.0f / 255.0f, 108.0f / 255.0f, 28.0f / 255.0f, 255.0f / 255.0f); color_bubbleEvent = new Color(255.0f / 255.0f, 255.0f / 255.0f, 255.0f / 255.0f, 255.0f / 255.0f); color_bubbleSelectionMarker = new Color(255.0f / 255.0f, 255.0f / 255.0f, 255.0f / 255.0f, 255.0f / 255.0f); color_numberEvent = new Color(238.0f / 255.0f, 105.0f / 255.0f, 105.0f / 255.0f, 255.0f / 255.0f); color_year = new Color(255.0f / 255.0f, 255.0f / 255.0f, 255.0f / 255.0f, 255.0f / 255.0f); color_month = new Color(255.0f / 255.0f, 255.0f / 255.0f, 255.0f / 255.0f, 255.0f / 255.0f); color_day = new Color(255.0f / 255.0f, 255.0f / 255.0f, 255.0f / 255.0f, 255.0f / 255.0f);; color_dayOfWeek = new Color(255.0f / 255.0f, 255.0f / 255.0f, 255.0f / 255.0f, 255.0f / 255.0f); color_Events = new Color(255.0f / 255.0f, 255.0f / 255.0f, 255.0f / 255.0f, 255.0f / 255.0f); color_ButtonRight = new Color(255.0f / 255.0f, 255.0f / 255.0f, 255.0f / 255.0f, 255.0f / 255.0f); color_ButtonLeft = new Color(255.0f / 255.0f, 255.0f / 255.0f, 255.0f / 255.0f, 255.0f / 255.0f); color_Home = new Color(255.0f / 255.0f, 255.0f / 255.0f, 255.0f / 255.0f, 255.0f / 255.0f); } // ====================================================== // =================== GOOGLE MATERIAL ================== // ====================================================== if (style == (int)FlatCalendarStyle.COLORS_TYPE.GOOGLE_MATERIAL) { color_header = new Color(33.0f / 255.0f, 150.0f / 255.0f, 243.0f / 255.0f, 255.0f / 255.0f); color_subheader = new Color(0.0f / 255.0f, 112.0f / 255.0f, 128.0f / 255.0f, 255.0f / 255.0f); color_body = new Color(255.0f / 255.0f, 255.0f / 255.0f, 255.0f / 255.0f, 255.0f / 255.0f); color_footer = new Color(67.0f / 255.0f, 77.0f / 255.0f, 87.0f / 255.0f, 255.0f / 255.0f); color_dayTextNormal = new Color(0.0f / 255.0f, 0.0f / 255.0f, 0.0f / 255.0f, 255.0f / 255.0f); color_dayTextEvent = new Color(255.0f / 255.0f, 255.0f / 255.0f, 255.0f / 255.0f, 255.0f / 255.0f); color_bubbleEvent = new Color(21.0f / 255.0f, 101.0f / 255.0f, 192.0f / 255.0f, 255.0f / 255.0f); color_bubbleSelectionMarker = new Color(21.0f / 255.0f, 101.0f / 255.0f, 192.0f / 255.0f, 255.0f / 255.0f); color_numberEvent = new Color(238.0f / 255.0f, 105.0f / 255.0f, 105.0f / 255.0f, 255.0f / 255.0f); color_year = new Color(255.0f / 255.0f, 255.0f / 255.0f, 255.0f / 255.0f, 255.0f / 255.0f); color_month = new Color(255.0f / 255.0f, 255.0f / 255.0f, 255.0f / 255.0f, 255.0f / 255.0f); color_day = new Color(255.0f / 255.0f, 255.0f / 255.0f, 255.0f / 255.0f, 255.0f / 255.0f);; color_dayOfWeek = new Color(255.0f / 255.0f, 255.0f / 255.0f, 255.0f / 255.0f, 255.0f / 255.0f); color_Events = new Color(255.0f / 255.0f, 255.0f / 255.0f, 255.0f / 255.0f, 255.0f / 255.0f); color_ButtonRight = new Color(255.0f / 255.0f, 255.0f / 255.0f, 255.0f / 255.0f, 255.0f / 255.0f); color_ButtonLeft = new Color(255.0f / 255.0f, 255.0f / 255.0f, 255.0f / 255.0f, 255.0f / 255.0f); color_Home = new Color(255.0f / 255.0f, 255.0f / 255.0f, 255.0f / 255.0f, 255.0f / 255.0f); } // ====================================================== // =================== USER_MADE ================== // ====================================================== if (style == (int)FlatCalendarStyle.COLORS_TYPE.GOOGLE_MATERIAL) { color_header = new Color(111.0f / 255.0f, 103.0f / 255.0f, 103.0f / 255.0f, 255.0f / 255.0f); color_subheader = new Color(255.0f / 255.0f, 255.0f / 255.0f, 255.0f / 255.0f, 255.0f / 255.0f); color_body = new Color(255.0f / 255.0f, 255.0f / 255.0f, 255.0f / 255.0f, 255.0f / 255.0f); color_footer = new Color(111.0f / 255.0f, 103.0f / 255.0f, 103.0f / 255.0f, 255.0f / 255.0f); color_dayTextNormal = new Color(0.0f / 255.0f, 0.0f / 255.0f, 0.0f / 255.0f, 255.0f / 255.0f); color_dayTextEvent = new Color(255.0f / 255.0f, 255.0f / 255.0f, 255.0f / 255.0f, 255.0f / 255.0f); color_bubbleEvent = new Color(21.0f / 255.0f, 101.0f / 255.0f, 192.0f / 255.0f, 255.0f / 255.0f); color_bubbleSelectionMarker = new Color(21.0f / 255.0f, 101.0f / 255.0f, 192.0f / 255.0f, 255.0f / 255.0f); color_numberEvent = new Color(238.0f / 255.0f, 105.0f / 255.0f, 105.0f / 255.0f, 255.0f / 255.0f); color_year = new Color(255.0f / 255.0f, 255.0f / 255.0f, 255.0f / 255.0f, 255.0f / 255.0f); color_month = new Color(255.0f / 255.0f, 255.0f / 255.0f, 255.0f / 255.0f, 255.0f / 255.0f); color_day = new Color(255.0f / 255.0f, 255.0f / 255.0f, 255.0f / 255.0f, 255.0f / 255.0f);; color_dayOfWeek = new Color(255.0f / 255.0f, 255.0f / 255.0f, 255.0f / 255.0f, 255.0f / 255.0f); color_Events = new Color(255.0f / 255.0f, 255.0f / 255.0f, 255.0f / 255.0f, 255.0f / 255.0f); color_ButtonRight = new Color(255.0f / 255.0f, 255.0f / 255.0f, 255.0f / 255.0f, 255.0f / 255.0f); color_ButtonLeft = new Color(255.0f / 255.0f, 255.0f / 255.0f, 255.0f / 255.0f, 255.0f / 255.0f); color_Home = new Color(255.0f / 255.0f, 255.0f / 255.0f, 255.0f / 255.0f, 255.0f / 255.0f); } /* Change Colors */ GameObject.Find("Header").GetComponent <Image>().color = color_header; GameObject.Find("SubHeader").GetComponent <Image>().color = color_subheader; GameObject.Find("Body").GetComponent <Image>().color = color_body; GameObject.Find("Footer").GetComponent <Image>().color = color_footer; GameObject.Find("Year").GetComponent <Text>().color = color_year; GameObject.Find("Month").GetComponent <Text>().color = color_month; GameObject.Find("Day_Title1").GetComponent <Text>().color = color_day; GameObject.Find("Day_Title2").GetComponent <Text>().color = color_dayOfWeek; //GameObject.Find("NumberEvents").GetComponent<Text>().color = color_numberEvent; //GameObject.Find("Events").GetComponent<Text>().color = color_Events; GameObject.Find("Left_btn").GetComponent <Image>().color = color_ButtonLeft; GameObject.Find("Right_btn").GetComponent <Image>().color = color_ButtonRight; GameObject.Find("Calendar_Btn").GetComponent <Image>().color = color_Home; /* Change Text Color */ if (Application.isPlaying) { GameObject obj = GameObject.Find("FlatCalendar"); FlatCalendar f = obj.GetComponent <FlatCalendar>(); f.setCurrentTime(); f.updateCalendar(f.currentTime.month, f.currentTime.year); f.markSelectionDay(f.currentTime.day); } }