diff --git a/Assets/Scripts/UI/UITextTip.cs b/Assets/Scripts/UI/UITextTip.cs index d09da503..154c5dec 100644 --- a/Assets/Scripts/UI/UITextTip.cs +++ b/Assets/Scripts/UI/UITextTip.cs @@ -4,6 +4,8 @@ using QFramework; using System.Collections.Generic; using TMPro; using System.Text.RegularExpressions; +using static OperationController; +using System; namespace QFramework.Example { @@ -20,10 +22,16 @@ namespace QFramework.Example { mData = uiData as UITextTipData ?? new UITextTipData(); + TypeEventSystem.Global.Register(OnStepChanged).UnRegisterWhenGameObjectDestroyed(this); TypeEventSystem.Global.Register((arg) => Hide()).UnRegisterWhenGameObjectDestroyed(gameObject); } + private void OnStepChanged(StepStatusOnChange change) + { + Hide(); + } + protected override void OnOpen(IUIData uiData = null) { mData = uiData as UITextTipData ?? new UITextTipData();