private void LoadContent()
        {
            _keyTextureMap = new KeyTextureMap();
            _keyTextureMap.CacheAll(Content);
            _gamePadTextureMap = new GamePadTextureMap();
            _gamePadTextureMap.CacheAll(Content);

            _root.BuildFromPrototypes(Content, Content.Load <List <WidgetPrototype> >("ui_options_menu"));

            // Update all values from CVars
            UpdateWidgetsFromCVars();
        }
예제 #2
0
        protected override void OnInitialize()
        {
            _root = new Root(GameManager.GraphicsDevice.Viewport.Width,
                             GameManager.GraphicsDevice.Viewport.Height);
            _root.BuildFromPrototypes(Content, Content.Load <List <WidgetPrototype> >("ui_lobby_menu"));

            _root.AutoControlModeSwitching = false;

            _keyTextureMap = new KeyTextureMap();
            _keyTextureMap.CacheAll(Content);
            _gamePadTextureMap = new GamePadTextureMap();
            _gamePadTextureMap.CacheAll(Content);

            ProcessManager.Attach(new EntityBackgroundSpawner(SharedState.Engine, SharedState.Camera));

            UpdateUI();

            base.OnInitialize();
        }