This commit is contained in:
CortexCore
2024-04-06 16:33:32 +08:00
parent 637bbef7d2
commit 37e7fcea51
42 changed files with 597 additions and 149 deletions

View File

@@ -75,13 +75,23 @@ namespace BITKit.UX
BITKit.UX.UXUtils.Inject(this);
if(IsValid && autoEntry)
UXService.Entry(this);
var returnButton= document.rootVisualElement.Q("return-button");
returnButton?.RegisterCallback<MouseDownEvent>(x =>
{
if (x.button is 0)
OnReturn();
});
}
public bool IsEntered { get; set; }
public void Entry()
{
UXService.Entry(this);
}
protected virtual void OnReturn()
{
UXService.Return();
}
protected virtual void OnEnable()=>UXService.Register(this);
protected virtual void OnDisable()=>UXService.UnRegister(this);
protected virtual void OnPanelEntry(){}