This commit is contained in:
CortexCore
2024-12-26 23:07:17 +08:00
3 changed files with 16 additions and 13 deletions

View File

@@ -50,6 +50,9 @@ namespace BITKit.UX
VisualTreeAsset = await ModService.LoadAsset<VisualTreeAsset>(DocumentPath);
RootVisualElement = UXService.Root.As<VisualElement>().Create(VisualTreeAsset);
RootVisualElement.name = DocumentPath;
RootVisualElement.pickingMode = PickingMode.Ignore;
RootVisualElement.style.position = Position.Absolute;
RootVisualElement.style.left = 0;
@@ -78,12 +81,12 @@ namespace BITKit.UX
invisible.style.backgroundColor = new Color(0, 0, 0, 0.9f);
}
UXUtils.Inject(this);
UXUtils.Inject(this,RootVisualElement);
OnInitiated?.Invoke();
RootVisualElement.SetActive(false);
OnInitiated?.Invoke();
await OnInitiatedAsync.UniTaskFunc();
WaitUtilInitialized.TrySetResult();