示例#1
0
    private void PushPanel(string pageName, UIBasePanel pageInstance, Action callback, object pageData, bool isAsync)
    {
        if (string.IsNullOrEmpty(pageName) || pageInstance == null)
        {
            Debug.LogError("[UI] show page error with :" + pageName + " maybe null instance.");
            return;
        }

        if (mOpenedUIList.ContainsKey(pageName))
        {
            mCurrPage = mOpenedUIList[pageName];
        }
        else
        {
            mOpenedUIList.Add(pageName, pageInstance);
            mCurrPage = pageInstance;
        }
        if (pageData != null)
        {
            mCurrPage.SetData(pageData);
        }

        mCurrPage.OnEnter();
        SetNavigationStack(mCurrPage);

        //if (isAsync)
        //    curPanel.Show(callback);
        //else

        //DebugHelper.LogInfo(mNavigationStack.Count);
    }