This commit is contained in:
CortexCore
2023-10-24 23:37:59 +08:00
parent 325f63d6bc
commit 3e39e627bc
388 changed files with 29043 additions and 889 deletions

View File

@@ -24,6 +24,10 @@ namespace BITKit.UX
[SerializeField] private bool allowCursor;
[SerializeField] private bool allowInput;
[SerializeField] private bool autoEntry;
protected readonly InputActionGroup inputActionGroup = new()
{
allowGlobalActivation = false
};
public bool IsAnimate => isAnimate;
public bool IsValid => cancellationToken.IsCancellationRequested is false;
public string Index { get; private set; }
@@ -50,12 +54,14 @@ namespace BITKit.UX
{
OnEntryOrExit(true);
document.rootVisualElement.SetActive(true);
inputActionGroup.allowInput.AddElement(this);
OnEntry?.Invoke();
}
void IUXPanel.Exit()
{
if (IsValid is false) return;
OnEntryOrExit(false);
inputActionGroup.allowInput.RemoveElement(this);
try
{
document.rootVisualElement.SetActive(false);