2023-01-24 19:31:49 +00:00
|
|
|
using System;
|
2022-07-04 16:57:19 +00:00
|
|
|
using UnityEngine;
|
2023-01-24 19:31:49 +00:00
|
|
|
using UnityEngine.UI;
|
2022-07-04 16:57:19 +00:00
|
|
|
using TMPro;
|
|
|
|
|
2023-01-24 19:31:49 +00:00
|
|
|
using HeavenStudio.Common;
|
|
|
|
|
2022-07-04 16:57:19 +00:00
|
|
|
namespace HeavenStudio.Editor
|
|
|
|
{
|
2022-08-27 03:43:01 +00:00
|
|
|
public class SettingsDialog : Dialog
|
2022-07-04 16:57:19 +00:00
|
|
|
{
|
2022-10-13 16:20:48 +00:00
|
|
|
[SerializeField] private TMP_Text BuildDateDisplay;
|
2023-01-24 19:31:49 +00:00
|
|
|
[SerializeField] private TabsManager tabsManager;
|
|
|
|
[SerializeField] private TabsManager.TabsEntry[] tabs;
|
|
|
|
|
2022-07-04 16:57:19 +00:00
|
|
|
private void Start() {}
|
|
|
|
|
|
|
|
public void SwitchSettingsDialog()
|
|
|
|
{
|
2022-08-27 03:43:01 +00:00
|
|
|
if(dialog.activeSelf) {
|
|
|
|
Editor.instance.canSelect = true;
|
|
|
|
Editor.instance.inAuthorativeMenu = false;
|
|
|
|
dialog.SetActive(false);
|
2023-01-24 19:31:49 +00:00
|
|
|
|
|
|
|
PersistentDataManager.SaveSettings();
|
|
|
|
tabsManager.CleanTabs();
|
2022-07-04 16:57:19 +00:00
|
|
|
} else {
|
2022-08-27 03:43:01 +00:00
|
|
|
ResetAllDialogs();
|
|
|
|
Editor.instance.canSelect = false;
|
|
|
|
Editor.instance.inAuthorativeMenu = true;
|
|
|
|
dialog.SetActive(true);
|
2022-10-13 16:20:48 +00:00
|
|
|
|
2023-01-24 19:31:49 +00:00
|
|
|
tabsManager.GenerateTabs(tabs);
|
|
|
|
|
2022-10-13 16:20:48 +00:00
|
|
|
BuildDateDisplay.text = GlobalGameManager.buildTime;
|
2022-07-04 16:57:19 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
private void Update() {}
|
|
|
|
}
|
|
|
|
}
|