Exemplo n.º 1
0
        public static void ShowUI(UILogic ui, Action callback, object[] param, bool isShowWaitingTip = true)
        {
            if (ui.bShow == true)
            {
                ui.ShowWindow(param, callback);
                return;
            }

            if (ui.Parent != null)
            {
                if (ui.Parent.bShow == true)
                {
                    ui.ShowWindow(param, callback);
                }

                return;
            }

            if (isShowWaitingTip && ui.Properties.HasProperty(UIProperties.DontShowLoadingTip))
            {
                isShowWaitingTip = false;
            }

            if (ui.Properties.HasProperty(UIProperties.UseMapType) == true)
            {
                if (ui.UIMapType != m_data.CurrentMapType)
                {
                    getContainer(ui).UIQueue.Enqueue(() => ShowUI(ui, callback, param));
                    return;
                }
            }

            if (checkShowUIHasProperty(UIProperties.UseMapType) == true)
            {
                getContainer(ui).UIQueue.Enqueue(() => ShowUI(ui, callback, param));
                return;
            }

            InternalShowUI(ui, callback, param, isShowWaitingTip);
        }
Exemplo n.º 2
0
        static void ShowUIHandler(UILogic ui, Action callback, object[] param, bool isShowWaitingTip)
        {
            m_uiHandler.Add(ui);

            CheckRelease(ui);
            UpdateCameraStatus();
            //if (isShowWaitingTip)
            //    EventDispatcher.TriggerEvent(MogoGlobleUIManagerEventsEx.ShowWaitingTip, true);
            ui.ShowWindow(param,
                          () =>
            {
                m_data.CurrentMainUI = ui;
                callback.SafeInvoke();
                //if (isShowWaitingTip)
                //    EventDispatcher.TriggerEvent(MogoGlobleUIManagerEventsEx.ShowWaitingTip, false);
            });
        }