HeavenStudioPlus/Assets/Scripts/LevelEditor/SettingsDialog/SettingsDialog.cs

41 lines
1.1 KiB
C#
Raw Normal View History

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