저장 확인 모달 UI 작업 #76
File diff suppressed because one or more lines are too long
1773
Assets/NewStudioJYM/ExitChecker.unity
Normal file
1773
Assets/NewStudioJYM/ExitChecker.unity
Normal file
File diff suppressed because it is too large
Load Diff
7
Assets/NewStudioJYM/ExitChecker.unity.meta
Normal file
7
Assets/NewStudioJYM/ExitChecker.unity.meta
Normal file
@@ -0,0 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 319962c572705f943b93efea9c0d6e93
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
49
Assets/NewStudioJYM/Scripts/Panel_ExitChecker.cs
Normal file
49
Assets/NewStudioJYM/Scripts/Panel_ExitChecker.cs
Normal file
@@ -0,0 +1,49 @@
|
||||
using UnityEngine;
|
||||
using XRLib.UI;
|
||||
using UnityEngine.UI;
|
||||
using System;
|
||||
|
||||
namespace XED
|
||||
{
|
||||
public class Panel_ExitChecker : PanelBase
|
||||
{
|
||||
private Button Button_SaveAndExit;
|
||||
private Button Button_Exit;
|
||||
private Button Button_Cancel;
|
||||
|
||||
public Action onSaveAndExit;
|
||||
public Action onExit;
|
||||
|
||||
public override void AfterAwake()
|
||||
{
|
||||
Button_SaveAndExit.onClick.AddListener(OnClickSaveAndExitButton);
|
||||
Button_Exit.onClick.AddListener(OnClickExitButton);
|
||||
Button_Cancel.onClick.AddListener(OnClickCancelButton);
|
||||
}
|
||||
|
||||
public void Open(string saveData)
|
||||
{
|
||||
gameObject.SetActive(true);
|
||||
|
||||
var isSaveAndExitButtonActive = saveData != string.Empty;
|
||||
Button_SaveAndExit.gameObject.SetActive(isSaveAndExitButtonActive);
|
||||
}
|
||||
public void Close()
|
||||
{
|
||||
gameObject.SetActive(false);
|
||||
}
|
||||
|
||||
private void OnClickSaveAndExitButton()
|
||||
{
|
||||
onSaveAndExit?.Invoke();
|
||||
}
|
||||
private void OnClickExitButton()
|
||||
{
|
||||
onExit?.Invoke();
|
||||
}
|
||||
private void OnClickCancelButton()
|
||||
{
|
||||
gameObject.SetActive(false);
|
||||
}
|
||||
}
|
||||
}
|
||||
2
Assets/NewStudioJYM/Scripts/Panel_ExitChecker.cs.meta
Normal file
2
Assets/NewStudioJYM/Scripts/Panel_ExitChecker.cs.meta
Normal file
@@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 59217f4e49a057248ac24df79c6efa70
|
||||
@@ -23,6 +23,14 @@ namespace XED
|
||||
public Action<UI_DynamicObjectItem> onUISetting;
|
||||
public SaveModelDatas saveModelDatas;
|
||||
|
||||
public void OpenModal()
|
||||
{
|
||||
gameObject.SetActive(true);
|
||||
}
|
||||
public void CloseModal()
|
||||
{
|
||||
gameObject.SetActive(false);
|
||||
}
|
||||
private void TestConnectedData()
|
||||
{
|
||||
var dynamicObjectDataJson = Resources.Load<TextAsset>("DynamicObjectData").text;
|
||||
|
||||
Reference in New Issue
Block a user