From 32d905a8ea3a8c890cf02836fab972f248e5a4bf Mon Sep 17 00:00:00 2001 From: shenjianxing <”315615051@qq.com“> Date: Fri, 28 Feb 2025 18:28:19 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9UI=E9=80=BB=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Assets/Scripts/UI/UIInstruction.cs | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/Assets/Scripts/UI/UIInstruction.cs b/Assets/Scripts/UI/UIInstruction.cs index cd7b57a3..84ba68df 100644 --- a/Assets/Scripts/UI/UIInstruction.cs +++ b/Assets/Scripts/UI/UIInstruction.cs @@ -13,6 +13,7 @@ namespace QFramework.Example public partial class UIInstruction : UIPanel { bool isNo = false; + bool isOperation = false; protected override void OnInit(IUIData uiData = null) { TypeEventSystem.Global.Register((arg) => Hide()).UnRegisterWhenGameObjectDestroyed(gameObject); @@ -46,8 +47,17 @@ namespace QFramework.Example }); ConfirmBtn.onClick.AddListener(() => { - Hide(); - isNo = NoToggle.isOn; + if (isOperation == false) + { + Operation.isOn = true; + isOperation = true; + } + else + { + Hide(); + isNo = NoToggle.isOn; + + } });