SHA256
forked from ADOFAIEditorForum/ADOFAIRenderer
39 lines
960 B
C#
39 lines
960 B
C#
using O5Kit.Core;
|
|
|
|
namespace ADOFAIRenderer.UI;
|
|
|
|
using UnityEngine;
|
|
|
|
public class RendererUIManager : MonoBehaviour
|
|
{
|
|
public static RendererUIManager Instance { get; private set; } = null!;
|
|
|
|
public static O5Context Context = null!;
|
|
public O5WindowManager WindowManager = null!;
|
|
|
|
private void Awake() {
|
|
Instance = this;
|
|
|
|
Context = new O5Context(
|
|
config: new O5Config {
|
|
UIScale = 1.0f,
|
|
MiddleClickToDefault = true,
|
|
SliderSensitivity = 1.0f
|
|
},
|
|
theme: O5Theme.Dark
|
|
);
|
|
|
|
WindowManager = O5WindowManager.Create(Context, transform, "RendererMod_Canvas");
|
|
}
|
|
|
|
private void Update() {
|
|
O5Object.TickAll();
|
|
Context.Tooltip.Tick();
|
|
O5Kit.Input.O5ShortcutManager.HandleUpdate();
|
|
}
|
|
|
|
private void OnDestroy() {
|
|
WindowManager.Dispose();
|
|
Context.Dispose();
|
|
}
|
|
} |