增加自动关闭功能

This commit is contained in:
shenjianxing 2025-01-09 10:22:06 +08:00
parent d21e1fcd8c
commit 1642e93d06

View File

@ -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<StepStatusOnChange>(OnStepChanged).UnRegisterWhenGameObjectDestroyed(this);
TypeEventSystem.Global.Register<OnModuleQuit>((arg) => Hide()).UnRegisterWhenGameObjectDestroyed(gameObject);
}
private void OnStepChanged(StepStatusOnChange change)
{
Hide();
}
protected override void OnOpen(IUIData uiData = null)
{
mData = uiData as UITextTipData ?? new UITextTipData();