public void GoToPage(string pageName)
 {
     if (pages.ContainsKey(pageName))
     {
         if (activePage != null)
         {
             activePage.OnHide();
         }
         prevPage   = activePage;
         activePage = pages[pageName];
         activePage.OnShow();
     }
 }
Beispiel #2
0
    private void showUIPage(UIPage uiPage, object param)
    {
        //将新显示的Page添加到队尾
        pageList.Remove(uiPage);
        pageList.Add(uiPage);

        //界面适配
        adjustRoot(uiPage);

        uiPage.OnShow(param);

        checkPops(uiPage);
    }
Beispiel #3
0
    public void ShowPage(UIPage page)
    {
        if (activePage != null)
        {
            activePage.OnHide();
        }

        activePage = page;

        if (activePage != null)
        {
            activePage.OnShow();
        }
    }
Beispiel #4
0
 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));
     }
 }
Beispiel #5
0
    // 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);
    }