예제 #1
0
        // Save and load checklist window config when the game scene is changed
        private void OnGameSceneSwitch(GameEvents.FromToAction <GameScenes, GameScenes> Data)
        {
            if (GameHelper.AllowChecklistWindow(Data.from))
            {
                WindowSettings W = _checklistWindow.BuildSettings( );
                Config.SetWindowConfig(W, Data.from);
            }

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



/*			if( GameHelper.AllowStatusWindow( Data.from ) )
 *                      {
 * //				WindowSettings W =_statusWindow.BuildSettings( );
 * //				Config.SetWindowConfig( W, Data.from );
 *                      }
 *
 *                      if( GameHelper.AllowStatusWindow( Data.to ) )
 *                      {
 * //				WindowSettings W = Config.GetWindowConfig( WINDOW_NAME_CHECKLIST, Data.to );
 * //				_statusWindow.ApplySettings( W );
 *                      }
 */
        }
예제 #2
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);
            }
        }
예제 #3
0
        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;
        }