From 7f46db91b889d8edd1cc639c7c62d75c8da712d6 Mon Sep 17 00:00:00 2001 From: shenjianxing <”315615051@qq.com“> Date: Mon, 30 Dec 2024 16:29:29 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8DUI=E6=B6=88=E5=A4=B1=E7=9A=84?= =?UTF-8?q?bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Assets/QFramework/Toolkits/UIKit/Scripts/UIKit.cs | 12 ++++++++++++ Assets/Scripts/Actions/UIShowAction.cs | 2 +- 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/Assets/QFramework/Toolkits/UIKit/Scripts/UIKit.cs b/Assets/QFramework/Toolkits/UIKit/Scripts/UIKit.cs index e705a5e1..66ae53c3 100644 --- a/Assets/QFramework/Toolkits/UIKit/Scripts/UIKit.cs +++ b/Assets/QFramework/Toolkits/UIKit/Scripts/UIKit.cs @@ -247,6 +247,18 @@ UIKit.HidePanel(""UIHomePanel""); panelSearchKeys.Recycle2Cache(); } + public static void HidePanel(Type type) + { + var panelSearchKeys = PanelSearchKeys.Allocate(); + + panelSearchKeys.PanelType = type; + + UIManager.Instance.HideUI(panelSearchKeys); + + panelSearchKeys.Recycle2Cache(); + } + + #if UNITY_EDITOR [MethodAPI] [APIDescriptionCN("关闭全部界面")] diff --git a/Assets/Scripts/Actions/UIShowAction.cs b/Assets/Scripts/Actions/UIShowAction.cs index 2c7da6be..0555a46c 100644 --- a/Assets/Scripts/Actions/UIShowAction.cs +++ b/Assets/Scripts/Actions/UIShowAction.cs @@ -53,7 +53,7 @@ public class UIShowAction : IAction } else { - UIKit.ClosePanel(ActionHelper.typeDict[uiName]); + UIKit.HidePanel(ActionHelper.typeDict[uiName]); this.Finish(); } }