public static void HidePanel(string panelName) { var panelSearchKeys = PanelSearchKeys.Allocate(); panelSearchKeys.GameObjName = panelName; UIManager.Instance.HideUI(panelSearchKeys); panelSearchKeys.Recycle2Cache(); }
public static void HidePanel <T>() where T : UIPanel { var panelSearchKeys = PanelSearchKeys.Allocate(); panelSearchKeys.PanelType = typeof(T); UIManager.Instance.HideUI(panelSearchKeys); panelSearchKeys.Recycle2Cache(); }
public static void ClosePanel(UIPanel panel) { var panelSearchKeys = PanelSearchKeys.Allocate(); panelSearchKeys.Panel = panel; UIManager.Instance.CloseUI(panelSearchKeys); panelSearchKeys.Recycle2Cache(); }
public static void Back <T>() { var panelSearchKeys = PanelSearchKeys.Allocate(); panelSearchKeys.PanelType = typeof(T); UIManager.Instance.CloseUI(panelSearchKeys); panelSearchKeys.Recycle2Cache(); Stack.Pop(); }
public static UIPanel GetPanel(string panelName) { var panelSearchKeys = PanelSearchKeys.Allocate(); panelSearchKeys.GameObjName = panelName; var retPanel = UIManager.Instance.GetUI(panelSearchKeys); panelSearchKeys.Recycle2Cache(); return(retPanel); }
public static T GetPanel <T>() where T : UIPanel { var panelSearchKeys = PanelSearchKeys.Allocate(); panelSearchKeys.PanelType = typeof(T); var retPanel = UIManager.Instance.GetUI(panelSearchKeys); panelSearchKeys.Recycle2Cache(); return(retPanel as T); }
public static UIPanel OpenPanel(string panelName, UILevel level = UILevel.Common, string assetBundleName = null) { var panelSearchKeys = PanelSearchKeys.Allocate(); panelSearchKeys.Level = level; panelSearchKeys.AssetBundleName = assetBundleName; panelSearchKeys.GameObjName = panelName; var retPanel = UIManager.Instance.OpenUI(panelSearchKeys); panelSearchKeys.Recycle2Cache(); return(retPanel as UIPanel); }
public static void Back(UIPanel currentPanel) { if (currentPanel.IsNotNull()) { var panelSearchKeys = PanelSearchKeys.Allocate(); panelSearchKeys.GameObjName = currentPanel.name; UIManager.Instance.CloseUI(panelSearchKeys); panelSearchKeys.Recycle2Cache(); } Stack.Pop(); }
public static void Back(string currentPanelName) { if (currentPanelName.IsNotNullAndEmpty()) { var panelSearchKeys = PanelSearchKeys.Allocate(); panelSearchKeys.GameObjName = currentPanelName; UIManager.Instance.CloseUI(panelSearchKeys); panelSearchKeys.Recycle2Cache(); } Stack.Pop(); }
public void Pop() { var previousPanelInfo = mUIStack.Pop(); var panelSearchKeys = PanelSearchKeys.Allocate(); panelSearchKeys.GameObjName = previousPanelInfo.GameObjName; panelSearchKeys.Level = previousPanelInfo.Level; panelSearchKeys.UIData = previousPanelInfo.UIData; panelSearchKeys.AssetBundleName = previousPanelInfo.AssetBundleName; panelSearchKeys.PanelType = previousPanelInfo.PanelType; UIManager.Instance.OpenUI(panelSearchKeys); panelSearchKeys.Recycle2Cache(); }
public void Push(IPanel view) { if (view != null) { mUIStack.Push(view.Info); view.Close(); var panelSearchKeys = PanelSearchKeys.Allocate(); panelSearchKeys.GameObjName = view.Transform.name; UIManager.Instance.RemoveUI(panelSearchKeys); panelSearchKeys.Recycle2Cache(); } }
public static T OpenPanel <T>(IUIData uiData, PanelOpenType panelOpenType = PanelOpenType.Single, string assetBundleName = null, string prefabName = null) where T : UIPanel { var panelSearchKeys = PanelSearchKeys.Allocate(); panelSearchKeys.OpenType = panelOpenType; panelSearchKeys.Level = UILevel.Common; panelSearchKeys.PanelType = typeof(T); panelSearchKeys.AssetBundleName = assetBundleName; panelSearchKeys.GameObjName = prefabName; panelSearchKeys.UIData = uiData; T retPanel = UIManager.Instance.OpenUI(panelSearchKeys) as T; panelSearchKeys.Recycle2Cache(); return(retPanel); }