1
0
mirror of https://github.com/soarqin/DSP_Mods.git synced 2025-12-09 14:53:30 +08:00
This commit is contained in:
2023-09-06 21:22:11 +08:00
parent 18505caa3b
commit c974d70564
8 changed files with 621 additions and 121 deletions

View File

@@ -0,0 +1,62 @@
using UnityEngine;
namespace CheatEnabler;
public class UIConfigWindow : UI.MyWindowWithTabs
{
private RectTransform _windowTrans;
public static UIConfigWindow CreateInstance()
{
return UI.MyWindowManager.CreateWindow<UIConfigWindow>("CEConfigWindow", "CheatEnabler Config");
}
public override void _OnCreate()
{
_windowTrans = GetComponent<RectTransform>();
_windowTrans.sizeDelta = new Vector2(640f, 428f);
CreateUI();
}
private void CreateUI()
{
//General tab
var tab1 = AddTab(36f, 0, _windowTrans, "General");
var x = 0f;
var y = 0f;
UI.MyCheckBox.CreateCheckBox(x, y, tab1, DevShortcuts.Enabled, "Enable Dev Shortcuts");
y += 26f;
UI.MyCheckBox.CreateCheckBox(x, y, tab1, AbnormalDisabler.Enabled, "Disable Abnormal Checks");
SetCurrentTab(0);
}
public override void _OnDestroy()
{
}
public override bool _OnInit()
{
_windowTrans.anchoredPosition = new Vector2(0, 0);
return true;
}
public override void _OnFree()
{
}
public override void _OnOpen()
{
}
public override void _OnClose()
{
}
public override void _OnUpdate()
{
if (!VFInput.escape || VFInput.inputing) return;
VFInput.UseEscape();
_Close();
}
}