작업 조건 분석 UI 디자인 변경
This commit is contained in:
@@ -25,6 +25,8 @@ public class UI_Calendar : UIBase
|
||||
private DateTime curDateTime;
|
||||
|
||||
private TextMeshProUGUI targetText;
|
||||
public float startSpace;
|
||||
public float endSpace;
|
||||
|
||||
public override void AfterAwake()
|
||||
{
|
||||
@@ -36,13 +38,13 @@ public class UI_Calendar : UIBase
|
||||
float mondayPosX = Text_Monday.anchoredPosition.x;
|
||||
float space = mondayPosX - sundayPosX;
|
||||
Vector2 prefabSize = prefab_calendarItem.GetComponent<RectTransform>().sizeDelta;
|
||||
Vector2 itemStartPos = new Vector2(Text_Sunday.anchoredPosition.x, Text_Sunday.anchoredPosition.y - space);
|
||||
Vector2 itemStartPos = new Vector2(Text_Sunday.anchoredPosition.x, Text_Sunday.anchoredPosition.y - startSpace);
|
||||
|
||||
for (int i = 0; i < totalItemNum; i++)
|
||||
{
|
||||
UI_CalendarItem item = Instantiate(prefab_calendarItem.gameObject, ItemRoot).GetComponent<UI_CalendarItem>();
|
||||
item.onClickEvent += OnClickItem;
|
||||
item.GetComponent<RectTransform>().anchoredPosition = new Vector3((i % 7) * space + itemStartPos.x, itemStartPos.y - (i / 7) * space);
|
||||
item.GetComponent<RectTransform>().anchoredPosition = new Vector3((i % 7) * space + itemStartPos.x, itemStartPos.y - (i / 7) * endSpace);
|
||||
calendarItemList.Add(item);
|
||||
}
|
||||
}
|
||||
@@ -79,7 +81,7 @@ public class UI_Calendar : UIBase
|
||||
DateTime day = firstDay.AddDays(date);
|
||||
if (day.Month == firstDay.Month) // ÇöÀç ´Þ
|
||||
{
|
||||
calendarItemList[i].SetDate(day, Color.black);
|
||||
calendarItemList[i].SetDate(day, Color.white);
|
||||
|
||||
if (originDateTime.Date == day.Date)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user