增加UI关闭
This commit is contained in:
parent
7f46db91b8
commit
148a02ee99
@ -308,6 +308,17 @@ UIKit.GetPanel(""UIHomePanel"");
|
||||
|
||||
return retPanel as T;
|
||||
}
|
||||
public static UIPanel GetPanel(Type type)
|
||||
{
|
||||
var panelSearchKeys = PanelSearchKeys.Allocate();
|
||||
panelSearchKeys.PanelType = type;
|
||||
|
||||
var retPanel = UIManager.Instance.GetUI(panelSearchKeys);
|
||||
|
||||
panelSearchKeys.Recycle2Cache();
|
||||
|
||||
return retPanel;
|
||||
}
|
||||
|
||||
#region 给脚本层用的 api
|
||||
|
||||
|
||||
@ -16,6 +16,7 @@ public class ActionHelper
|
||||
{ "UIBtns", typeof(QFramework.Example.UIBtns) },
|
||||
{ "UITools", typeof(QFramework.Example.UITools) },
|
||||
{ "UIHint", typeof(QFramework.Example.UIHint) },
|
||||
{ "UITextTip", typeof(QFramework.Example.UITextTip) },
|
||||
{ "UICameraSwitch", typeof(QFramework.Example.UICameraSwitch) },
|
||||
};
|
||||
|
||||
|
||||
@ -53,7 +53,11 @@ public class UIShowAction : IAction
|
||||
}
|
||||
else
|
||||
{
|
||||
UIKit.HidePanel(ActionHelper.typeDict[uiName]);
|
||||
if (UIKit.GetPanel(ActionHelper.typeDict[uiName]) != null)
|
||||
{
|
||||
UIKit.HidePanel(ActionHelper.typeDict[uiName]);
|
||||
}
|
||||
|
||||
this.Finish();
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user