1
This commit is contained in:
@@ -9,7 +9,7 @@ namespace BITKit.UX
|
||||
[Serializable]
|
||||
public class UIToolkitPanelMonoProxy : UXPanelImplement
|
||||
{
|
||||
[SerializeField] private MonoBehaviour monoBehaviour;
|
||||
protected override IUXPanel _iuxPanelImplementation => (IUXPanel)monoBehaviour;
|
||||
[SerializeField] private GameObject monoBehaviour;
|
||||
protected override IUXPanel service => monoBehaviour.GetComponent<IUXPanel>();
|
||||
}
|
||||
}
|
@@ -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);
|
||||
|
Reference in New Issue
Block a user