26.03.11 - 설비 알람 인코딩 오류 수정 - 설비 상태 인코딩 오류 수정 - AI 시뮬레이션 결과 인코딩 오류 수정 - 생산 현황판 인코딩 오류 수정 - TopMenu 인코딩 오류 수정
55 lines
1.5 KiB
C#
55 lines
1.5 KiB
C#
using Cysharp.Threading.Tasks;
|
||
using System;
|
||
using UnityEngine;
|
||
using UnityEngine.UI;
|
||
|
||
namespace AZTECHWB.UI
|
||
{
|
||
public class ExitProgramPanel : UIPanel
|
||
{
|
||
private Button Button_Exit;
|
||
private Button Button_Cancel;
|
||
private Button Button_Close;
|
||
|
||
private LayerPanel layerPanel;
|
||
|
||
public override async UniTask Init()
|
||
{
|
||
Button_Exit = GetElement<Button>(nameof(Button_Exit));
|
||
Button_Cancel = GetElement<Button>(nameof(Button_Cancel));
|
||
Button_Close = GetElement<Button>(nameof(Button_Close));
|
||
|
||
Button_Exit.onClick.AddListener(OnClickExitButton);
|
||
Button_Cancel.onClick.AddListener(OnClickCancelButton);
|
||
Button_Close.onClick.AddListener(OnClickCancelButton);
|
||
layerPanel = FindAnyObjectByType<LayerPanel>(FindObjectsInactive.Include);
|
||
|
||
await UniTask.CompletedTask;
|
||
}
|
||
public override void Open()
|
||
{
|
||
gameObject.SetActive(true);
|
||
layerPanel.Open();
|
||
gameObject.transform.SetAsLastSibling();
|
||
}
|
||
public override void Close()
|
||
{
|
||
layerPanel.Close();
|
||
gameObject.SetActive(false);
|
||
}
|
||
private void OnClickExitButton()
|
||
{
|
||
#if UNITY_EDITOR
|
||
UnityEditor.EditorApplication.isPlaying = false;
|
||
#else
|
||
Application.Quit(); // <20><><EFBFBD>ø<EFBFBD><C3B8><EFBFBD><EFBFBD>̼<EFBFBD> <20><><EFBFBD><EFBFBD>
|
||
#endif
|
||
}
|
||
private void OnClickCancelButton()
|
||
{
|
||
Close();
|
||
}
|
||
}
|
||
}
|
||
|