mirror of
https://github.com/RHeavenStudioPlus/HeavenStudioPlus.git
synced 2024-11-14 13:45:10 +00:00
adfacc07fa
* new letterbox implementation * make DSP buffer larger * add new "ambient" letterbox option * remap keyboard control * enable autoplay cheat mode * fix editor settings not being applied on start * run the cursor init in editor init remove debug prints
45 lines
No EOL
1.4 KiB
C#
45 lines
No EOL
1.4 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 != null && !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()
|
|
{
|
|
cursorCheckbox.isOn = PersistentDataManager.gameSettings.editorCursorEnable;
|
|
discordRPCCheckbox.isOn = PersistentDataManager.gameSettings.discordRPCEnable;
|
|
}
|
|
|
|
public override void OnCloseTab()
|
|
{
|
|
}
|
|
}
|
|
} |