1
This commit is contained in:
@@ -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(){}
|
||||
|
Reference in New Issue
Block a user