public void GoToPage(string pageName) { if (pages.ContainsKey(pageName)) { if (activePage != null) { activePage.OnHide(); } prevPage = activePage; activePage = pages[pageName]; activePage.OnShow(); } }
private void showUIPage(UIPage uiPage, object param) { //将新显示的Page添加到队尾 pageList.Remove(uiPage); pageList.Add(uiPage); //界面适配 adjustRoot(uiPage); uiPage.OnShow(param); checkPops(uiPage); }
public void ShowPage(UIPage page) { if (activePage != null) { activePage.OnHide(); } activePage = page; if (activePage != null) { activePage.OnShow(); } }
static int OnShow(IntPtr L) { try { ToLua.CheckArgsCount(L, 2); UIPage obj = (UIPage)ToLua.CheckObject(L, 1, typeof(UIPage)); object arg0 = ToLua.ToVarObject(L, 2); obj.OnShow(arg0); return(0); } catch (Exception e) { return(LuaDLL.toluaL_exception(L, e)); } }
// Use this for initialization void Awake() { if (instance == null) { instance = this; } else if (instance != this) { Destroy(gameObject); } foreach (UIPage page in GetComponentsInChildren <UIPage>()) { page.OnHide(); } activePage.OnShow(); DeviceController.onModuleActivated += controllerActivated; //Sets this to not be destroyed when reloading scene DontDestroyOnLoad(gameObject); }