라이브러리 비활성화 기능 수정 및 초기 메인 화면 UI 변경

This commit is contained in:
정영민
2025-03-20 14:09:04 +09:00
parent f012034879
commit b03b8fd9e6
7 changed files with 116 additions and 198 deletions

View File

@@ -21,8 +21,8 @@ namespace CHN
workConditionAnalysis = FindSingle<Panel_WorkConditionAnalysis>();
workTimeAnalysis = FindSingle<Panel_WorkTimeAnalysis>();
PlayerPrefs.SetInt("isCompleteAlramHistory", 0);
PlayerPrefs.SetInt("isLibrary", 0);
PlayerPrefs.SetInt("isCompleteAlramHistory", 1);
PlayerPrefs.SetInt("isLibrary", 1);
PlayerPrefs.SetInt("isWorkConditionAnalysis", 0);
PlayerPrefs.SetInt("isWorkTimeAnalysis", 0);

View File

@@ -46,7 +46,7 @@ public class UI_BarChartData : UIBase
float clampedX = Mathf.Clamp(topPosition.x + offset.x, -parentSize.x / 2 + uiSize.x / 2, parentSize.x / 2 - uiSize.x / 2);
rectTransform.position = new Vector2(clampedX + offset.x, offset.y);
rectTransform.localPosition = new Vector2(clampedX, offset.y);
gameObject.SetActive(true);
}
}

View File

@@ -25,7 +25,12 @@ namespace CHN
var isBool = PlayerPrefs.GetInt(type) == 0 ? false : true;
toggle.isOn = isBool;
dashboardItem.gameObject.SetActive(isBool);
if(type != "isLibrary")
{
dashboardItem.gameObject.SetActive(isBool);
}
toggle.onValueChanged.AddListener(OnValueChange);
//LocaleService.Instance.OnChanged += OnChangeText;
}
@@ -62,7 +67,23 @@ namespace CHN
PlayerPrefs.SetInt(type, isOn ? 1 : 0);
PlayerPrefs.Save();
dashboardItem.gameObject.SetActive(isOn);
if (type != "isLibrary")
{
dashboardItem.gameObject.SetActive(isOn);
}
else
{
var library = dashboardItem.gameObject.GetComponent<Panel_Library>();
if (isOn)
{
library.Open();
}
else
{
library.Close();
}
}
}
private string Type()