From abc7ffedc4b571e83e36b20612c0ba3850365536 Mon Sep 17 00:00:00 2001 From: shenjianxing <”315615051@qq.com“> Date: Thu, 9 Jan 2025 09:27:13 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E8=BF=94=E5=9B=9E=E6=8C=89?= =?UTF-8?q?=E9=92=AE=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Assets/Scripts/UI/UIRightTop.cs | 38 +++++++++++++++++---------------- 1 file changed, 20 insertions(+), 18 deletions(-) diff --git a/Assets/Scripts/UI/UIRightTop.cs b/Assets/Scripts/UI/UIRightTop.cs index e1894d4d..374c4de5 100644 --- a/Assets/Scripts/UI/UIRightTop.cs +++ b/Assets/Scripts/UI/UIRightTop.cs @@ -27,24 +27,8 @@ namespace QFramework.Example data.btns.Add(new UITipWindowData.ItemData() { txt = "ȡ" }); UIKit.OpenPanelAsync(uiData: data, canvasLevel: UILevel.PopUI).ToAction().StartGlobal(); }); - - homeBtn.onClick.AddListener(() => - { - UITipWindowData data = new UITipWindowData(); - data.txt = "Ƿ˳ǰģ飿"; - data.btns.Add(new UITipWindowData.ItemData() - { - txt = "ȷ", - OnClick = () => - { - Hide(); - TypeEventSystem.Global.Send(); - UIKit.OpenPanelAsync().ToAction().StartGlobal(); - } - }); - data.btns.Add(new UITipWindowData.ItemData() { txt = "ȡ" }); - UIKit.OpenPanelAsync(uiData: data, canvasLevel: UILevel.PopUI).ToAction().StartGlobal(); - }); + closeBtn.onClick.AddListener(Home); + homeBtn.onClick.AddListener(Home); desBtn.onClick.AddListener(() => { @@ -57,6 +41,24 @@ namespace QFramework.Example }); } + public void Home() + { + UITipWindowData data = new UITipWindowData(); + data.txt = "Ƿ˳ǰģ飿"; + data.btns.Add(new UITipWindowData.ItemData() + { + txt = "ȷ", + OnClick = () => + { + Hide(); + TypeEventSystem.Global.Send(); + UIKit.OpenPanelAsync().ToAction().StartGlobal(); + } + }); + data.btns.Add(new UITipWindowData.ItemData() { txt = "ȡ" }); + UIKit.OpenPanelAsync(uiData: data, canvasLevel: UILevel.PopUI).ToAction().StartGlobal(); + } + protected override void OnOpen(IUIData uiData = null) { Title.text = Global.Instance.curModule.ModuleName;