UI 패널 활성화 토글 기능 개발
This commit is contained in:
53
Assets/WorkSpace/Personal/JYM/Panel_DashBoard.cs
Normal file
53
Assets/WorkSpace/Personal/JYM/Panel_DashBoard.cs
Normal file
@@ -0,0 +1,53 @@
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
using WI;
|
||||
namespace CHN
|
||||
{
|
||||
public class Panel_DashBoard : PanelBase
|
||||
{
|
||||
public UI_DashboardCheckListBox dashBoardCheckListBox;
|
||||
|
||||
public Panel_CompleteAlramHistory completeAlramHistory;
|
||||
public Panel_Library library;
|
||||
public Panel_WorkConditionAnalysis workConditionAnalysis;
|
||||
public Panel_WorkTimeAnalysis workTimeAnalysis;
|
||||
public override void AfterAwake()
|
||||
{
|
||||
dashBoardCheckListBox = GetComponentInChildren<UI_DashboardCheckListBox>(true);
|
||||
|
||||
completeAlramHistory = FindSingle<Panel_CompleteAlramHistory>();
|
||||
library = FindSingle<Panel_Library>();
|
||||
workConditionAnalysis = FindSingle<Panel_WorkConditionAnalysis>();
|
||||
workTimeAnalysis = FindSingle<Panel_WorkTimeAnalysis>();
|
||||
|
||||
PlayerPrefs.SetInt("isCompleteAlramHistory", 0);
|
||||
PlayerPrefs.SetInt("isLibrary", 0);
|
||||
PlayerPrefs.SetInt("isWorkConditionAnalysis", 0);
|
||||
PlayerPrefs.SetInt("isWorkTimeAnalysis", 0);
|
||||
|
||||
SetDashBoardCheckListBox();
|
||||
}
|
||||
public Dictionary<string, GameObject> GetDashboardItem()
|
||||
{
|
||||
var dic = new Dictionary<string, GameObject>();
|
||||
|
||||
dic.Add("완료 알람 시간", completeAlramHistory.gameObject);
|
||||
dic.Add("라이브러리", library.gameObject);
|
||||
dic.Add("작업 조건 분석", workConditionAnalysis.gameObject);
|
||||
dic.Add("작업 시간 분석", workTimeAnalysis.gameObject);
|
||||
|
||||
return dic;
|
||||
}
|
||||
private void SetDashBoardCheckListBox()
|
||||
{
|
||||
var dashboardItem = GetDashboardItem();
|
||||
|
||||
dashBoardCheckListBox.Init(dashboardItem);
|
||||
}
|
||||
public void Open()
|
||||
{
|
||||
SetActive(true);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user