Exemplo n.º 1
0
        public void Update(IGameContext gameContext, IUpdateContext updateContext)
        {
            _mainMenuController.Update(gameContext, updateContext);

            UpdateToolbar();

            /* var state = _loadedGame.GetPlaybackState();
             *
             * _playButton.Toggled = state == LoadedGameState.Playing || state == LoadedGameState.Paused;
             * _pauseButton.Toggled = state == LoadedGameState.Paused;
             *
             * _playButton.Enabled = _projectManager.Project != null && state != LoadedGameState.Loading;
             * _pauseButton.Enabled = state == LoadedGameState.Playing || state == LoadedGameState.Paused;
             * _stopButton.Enabled = state == LoadedGameState.Playing || state == LoadedGameState.Paused;
             *
             * _vsButton.Enabled = _projectManager.Project != null;
             * _debugButton.Enabled = _projectManager.Project != null && state == LoadedGameState.Loaded;
             * _debugGpuButton.Enabled = _projectManager.Project != null && state == LoadedGameState.Loaded;*/

            /*foreach (var t in _toolButtons)
             * {
             *  t.Enabled = _projectManager.Project != null;
             * }*/

            if (_projectManager.Project != null)
            {
                _recentProjects.DisposeAllLoadedTextures();
            }

            gameContext.Window.Title = "Protogame 7.0.0 (" + (_projectManager?.Project?.Name ?? "<No Project>") + "; Build c510ef6)";

            _extensionManager.Update();
        }
Exemplo n.º 2
0
        public void Update(IGameContext gameContext, IUpdateContext updateContext)
        {
            _mainMenuController.Update(gameContext, updateContext);

            _playButton.Toggled  = _loadedGame.State == LoadedGameState.Playing || _loadedGame.State == LoadedGameState.Paused;
            _pauseButton.Toggled = _loadedGame.State == LoadedGameState.Paused;

            _playButton.Enabled  = _projectManager.Project != null && _loadedGame.State != LoadedGameState.Loading;
            _pauseButton.Enabled = _loadedGame.State == LoadedGameState.Playing || _loadedGame.State == LoadedGameState.Paused;
            _stopButton.Enabled  = _loadedGame.State == LoadedGameState.Playing || _loadedGame.State == LoadedGameState.Paused;

            foreach (var t in _toolButtons)
            {
                t.Enabled = _projectManager.Project != null;
            }

            if (_projectManager.Project != null)
            {
                _recentProjects.DisposeAllLoadedTextures();
            }

            gameContext.Window.Title = "Protogame 7.0.0 (" + (_projectManager?.Project?.Name ?? "<No Project>") + "; Build c510ef6)";

            _extensionManager.Update();
        }