mirror of
https://github.com/RHeavenStudioPlus/HeavenStudioPlus.git
synced 2024-11-10 11:45:09 +00:00
d96570513e
* modularize tabs-style menus * make remix properties use modular design * add persistent settings
43 lines
No EOL
1.2 KiB
C#
43 lines
No EOL
1.2 KiB
C#
using UnityEngine;
|
|
using UnityEngine.UI;
|
|
using TMPro;
|
|
|
|
using HeavenStudio.Common;
|
|
|
|
namespace HeavenStudio.Editor
|
|
{
|
|
public class EditorSettings : TabsContent
|
|
{
|
|
public Toggle cursorCheckbox;
|
|
public Toggle discordRPCCheckbox;
|
|
|
|
private void Start() {
|
|
cursorCheckbox.isOn = PersistentDataManager.gameSettings.editorCursorEnable;
|
|
discordRPCCheckbox.isOn = PersistentDataManager.gameSettings.discordRPCEnable;
|
|
}
|
|
|
|
public void OnCursorCheckboxChanged()
|
|
{
|
|
Editor.instance.isCursorEnabled = cursorCheckbox.isOn;
|
|
PersistentDataManager.gameSettings.editorCursorEnable = cursorCheckbox.isOn;
|
|
if (!Editor.instance.fullscreen)
|
|
{
|
|
GameManager.instance.CursorCam.enabled = Editor.instance.isCursorEnabled;
|
|
}
|
|
}
|
|
|
|
public void OnRPCCheckboxChanged()
|
|
{
|
|
PersistentDataManager.gameSettings.discordRPCEnable = discordRPCCheckbox.isOn;
|
|
Editor.instance.isDiscordEnabled = discordRPCCheckbox.isOn;
|
|
}
|
|
|
|
public override void OnOpenTab()
|
|
{
|
|
}
|
|
|
|
public override void OnCloseTab()
|
|
{
|
|
}
|
|
}
|
|
} |