SHA256
Implement O5Kit
This commit is contained in:
8 files changed
+99
-175
No files matched your search
@@ -0,0 +1,39 @@
|
||||
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();
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user