Exemplo n.º 1
0
        /// <summary>
        /// 从界面组移除界面。
        /// </summary>
        /// <param name="uiForm">要移除的界面。</param>
        public void RemoveUIForm(UIForm uiForm)
        {
            UIFormInfo uiFormInfo = GetUIFormInfo(uiForm);

            if (uiFormInfo == null)
            {
                Debug.LogError("界面信息为空,无法移除界面");
            }

            //遮挡界面
            if (!uiFormInfo.Covered)
            {
                uiFormInfo.Covered = true;
                uiForm.OnCover();
            }

            //暂停界面
            if (!uiFormInfo.Paused)
            {
                uiFormInfo.Paused = true;
                uiForm.OnPause();
            }

            m_UIFormInfos.Remove(uiFormInfo);
        }
Exemplo n.º 2
0
        /// <summary>
        /// 激活界面
        /// </summary>
        /// <param name="uiForm">要激活的界面</param>
        /// <param name="userData">用户自定义数据</param>
        public void RefocusUIForm(UIForm uiForm, object userData)
        {
            UIFormInfo uiFormInfo = GetUIFormInfo(uiForm);

            if (uiFormInfo == null)
            {
                Debug.LogError("要激活的界面的信息为空");
            }

            //将激活的界面放到链表最前
            m_UIFormInfos.Remove(uiFormInfo);
            m_UIFormInfos.AddFirst(uiFormInfo);
        }
Exemplo n.º 3
0
        /// <summary>
        /// 往界面组增加界面
        /// </summary>
        /// <param name="uiForm">要增加的界面</param>
        public void AddUIForm(UIForm uiForm)
        {
            UIFormInfo uiFormInfo = new UIFormInfo(uiForm);

            m_UIFormInfos.AddFirst(uiFormInfo);
        }