Esempio n. 1
0
        private void SwitchingGameScene(GameScenes From, GameScenes To)
        {
            HammerMusicMute( );             // Ensure we enforce music volume anyway


            // Checklist window settings
            if (GameHelper.AllowChecklistWindow(From))
            {
                WindowSettings W = _checklistWindow.BuildSettings( );
                W._scene = From;
                Config.SetWindowConfig(W);
            }

            if (GameHelper.AllowChecklistWindow(To))
            {
                WindowSettings W = Config.GetWindowConfig(WINDOW_NAME_CHECKLIST, To);
                _checklistWindow.ApplySettings(W);
            }



            // Status window settings
            if (GameHelper.AllowStatusWindow(From))
            {
                WindowSettings W = _statusWindow.BuildSettings( );
                W._scene = From;
                Config.SetWindowConfig(W);
            }

            if (GameHelper.AllowStatusWindow(To))
            {
                WindowSettings W = Config.GetWindowConfig(WINDOW_NAME_STATUS, To);
                _statusWindow.ApplySettings(W);
            }



            // Selected Object window settings
            if (GameScenes.TRACKSTATION == From)
            {
                WindowSettings W = _shipStateWindow.BuildSettings( );
                W._scene = From;
                Config.SetWindowConfig(W);
            }

            if (GameScenes.TRACKSTATION == To)
            {
                WindowSettings W = Config.GetWindowConfig(WINDOW_NAME_SHIP_STATE, To);
                _shipStateWindow.ApplySettings(W);
            }
        }
        private void OnGameSceneSwitch(GameEvents.FromToAction <GameScenes, GameScenes> Data)
        {
            if (GameHelper.AllowWindow(Data.from))
            {
                WindowSettings W = _window.BuildSettings( );
                Config.SetWindowConfig(W, Data.from);
            }

            if (GameHelper.AllowWindow(Data.to))
            {
                WindowSettings W = Config.GetWindowConfig("ScienceCheckList", Data.to);
                _window.ApplySettings(W);
            }

            _vExperimentsRefreshPending = true;
        }