コード例 #1
0
        public XUISafeAreaMgr()
        {
            mUIConfig = TinaX.Config.GetTinaXConfig <UIKitConfig>(Conf.ConfigPath.uikit);
            if (mUIConfig == null)
            {
                mUIConfig = new UIKitConfig();
                mUIConfig.Enable_UISafeArea = false;
                mIsEnable = false;
            }



            mModel         = LoadConfigFile();
            mCurDeviceInfo = mModel.CurDeviceInfo;
        }
コード例 #2
0
        /// <summary>
        /// 初始化
        /// </summary>
        public XUIMgrGateway(IVFS _vfs)
        {
            mVFS    = _vfs;
            mConfig = TinaX.Config.GetTinaXConfig <UIKitConfig>(ConfigPath.uikit);
            if (mConfig == null)
            {
                mConfig = new UIKitConfig();
                mConfig.Use_AdvancedMode = false;
            }

            mDefaultUIGroup = mConfig.Default_UIGroup;

            //初始化GameObject相关
            Init_GameObjects();
            //初始化UIMask
            m_UIMaskMgr  = null;
            m_UIMaskMgr  = new UIMaskMgr(mUIRootTrans, mConfig.MaskColor, this);
            m_UILayerMgr = null;
            m_UILayerMgr = new UILayerMgr(this);

            if (mConfig.Use_AdvancedMode)
            {
                //高级模式
                m_ManagerMode = 1;
                m_UIMgr_Adv   = null;
                m_UIMgr_Adv   = new XUIManagerAdv(this, mVFS);
            }
            else
            {
                //简单模式
                m_ManagerMode  = 0;
                m_UIMgr_Normal = null;
                m_UIMgr_Normal = new XUIManager(this, mVFS);
            }

            #region UISafeArea

            if (mConfig.Enable_UISafeArea)
            {
                mUISafeAreaMgr = new XUISafeAreaMgr()
                                 .Enable();
            }

            #endregion
        }