/// <summary> ///隐藏指定面板 /// </summary> /// <param name="pageName">Page name.</param> public void HidePage(string pageName) { bool isExist = CheckPageExist(pageName); if (isExist) { XPage _currXpage = m_pageDic[pageName]; if (_currXpage.m_currState == EPageState.OPEN) { _currXpage.Hide(); } } }
static int Hide(IntPtr L) { try { ToLua.CheckArgsCount(L, 1); XPage obj = (XPage)ToLua.CheckObject(L, 1, typeof(XPage)); obj.Hide(); return(0); } catch (Exception e) { return(LuaDLL.toluaL_exception(L, e)); } }
private void HideOtherPages(XPage currXPage) { List <XPage> xpages = GetAllPages(); int count = xpages.Count; for (int i = 0; i < count; i++) { XPage curr = xpages[i]; if (curr.Equals(currXPage)) { continue; } if (curr.m_currState == EPageState.OPEN && curr.m_pageType != EPagePosType.Fixed && curr.m_pageType != EPagePosType.Normal) { curr.Hide(); } } }
/// <summary> /// 隐藏当前的页面 /// </summary> public bool HideCurrPage() { if (currShowXPage != null) { if (currShowXPage.m_pageMode == EPageHideMode.HideOtherAndNeedBack) { if (m_pageNeedBackPool.Count > 0) { if (m_pageNeedBackPool.Peek().Equals(currShowXPage)) { XPage topPage = m_pageNeedBackPool.Pop(); topPage.Hide(); currShowXPage = null; if (m_pageNeedBackPool.Count > 0) { XPage _curr = m_pageNeedBackPool.Peek(); _curr.Rest(); currShowXPage = _curr; } } } } else { if (currShowXPage.m_currState == EPageState.OPEN) { currShowXPage.Hide(); currShowXPage = null; } } return(true); } else { Debug.Log("currShowPage is null"); return(false); } }