/// <summary> /// 隐藏当前的页面 /// </summary> public bool HideCurrPage() { if (currShowUI != null) { if (currShowUI.fairyUIMode == FairyUIMode.HideOtherAndNeedBack) { if (stackPages.Count > 0) { if (stackPages.Peek().Equals(currShowUI)) { FairyUI topPage = stackPages.Pop(); topPage.Hide(); currShowUI = null; if (stackPages.Count > 0) { FairyUI _curr = stackPages.Peek(); _curr.Show(); currShowUI = _curr; } } } } else { if (currShowUI.fairyUIState == FairyUIState.OPEN && !currShowUI.needPool) { currShowUI.Hide(); currShowUI = null; } else if (currShowUI.needPool) { currShowUI.Hide(); if (!currShowUI.HasGInStack()) { currShowUI = null; } } } return(true); } else { Debug.Log("currShowPage is null"); return(false); } }
/// <summary> ///隐藏指定面板 /// </summary> /// <param name="pageName">Page name.</param> public void HidePage(string pageName) { FairyUI _currXpage = CheckPageExist(pageName); if (_currXpage != null) { if (_currXpage.fairyUIState == FairyUIState.OPEN) { _currXpage.Hide(); } } }
static int Hide(IntPtr L) { try { ToLua.CheckArgsCount(L, 1); FairyUI obj = (FairyUI)ToLua.CheckObject <FairyUI>(L, 1); obj.Hide(); return(0); } catch (Exception e) { return(LuaDLL.toluaL_exception(L, e)); } }