示例#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 ChecklistButton_RightClick(object sender, EventArgs e)
        {
            //WarezCrawler 20190410 - Try to get experiments to update around mun
            //_mustDoFullRefresh = true;
            //ScheduleExperimentUpdate();
            //ScienceContext.LoadStatus.OnboardScienceUnloadedVessels = false;
            //ScienceContext.LoadStatus.Experiments = false;
            //ScienceContext.LoadStatus.ScienceSubjects = false;
            ScienceContext.LoadStatus.ExperimentCache = false;
            //ScienceContext.LoadStatus.KSCBiomes = false;

            if (Config.RighClickMutesMusic)
            {
                // Toggle the muted state
                Muted = !Muted;
                ScreenMessages.PostScreenMessage("[x] Science! - Music Mute");
            }
            else
            {
                if (_active && UiActive( ))
                {
                    if (GameHelper.AllowStatusWindow( ))
                    {
                        bool NewVisibility = !_statusWindow.IsVisible( );
                        _statusWindow.SetVisible(NewVisibility);
                        UpdateStatusVisibility(NewVisibility);

                        if (_statusWindow.IsVisible( ))
                        {
                            if (_statusButton != null)
                            {
                                _statusButton.SetOn( );
                            }
                            ScienceEventHandler.ScheduleExperimentUpdate( );
                        }
                        else
                        {
                            if (_statusButton != null)
                            {
                                _statusButton.SetOff( );
                            }
                        }
                    }
                }
            }
        }
        private void ChecklistButton_RightClick(object sender, EventArgs e)
        {
            if (Config.RighClickMutesMusic)
            {
                // Toggle the muted state
                Muted = !Muted;
                ScreenMessages.PostScreenMessage("[x] Science! - Music Mute");
            }
            else
            {
                if (_active && UiActive())
                {
                    if (GameHelper.AllowStatusWindow())
                    {
                        bool NewVisibility = !_statusWindow.IsVisible();
                        _statusWindow.SetVisible(NewVisibility);
                        UpdateStatusVisibility(NewVisibility);

                        _logger.Trace("ChecklistButton_RightClick, _statusWindow.IsVisible(): " + _statusWindow.IsVisible());
                        if (_statusWindow.IsVisible())
                        {
                            if (statusToolbarControl != null)
                            {
                                statusToolbarControl.SetTrue(true);
                            }
                            ScienceEventHandler.ScheduleExperimentUpdate(seconds: 0.1f);
                        }
                        else
                        {
                            if (statusToolbarControl != null)
                            {
                                statusToolbarControl.SetFalse(true);
                            }
                        }
                    }
                }
            }
        }
示例#4
0
        private void ChecklistButton_RightClick(object sender, EventArgs e)
        {
            if (Config.RighClickMutesMusic)
            {
                // Toggle the muted state
                Muted = !Muted;
                ScreenMessages.PostScreenMessage("[x] Science! - Music Mute");
            }
            else
            {
                if (_active && UiActive( ))
                {
                    if (GameHelper.AllowStatusWindow( ))
                    {
                        bool NewVisibility = !_statusWindow.IsVisible( );
                        _statusWindow.SetVisible(NewVisibility);
                        UpdateStatusVisibility(NewVisibility);

                        if (_statusWindow.IsVisible( ))
                        {
                            if (_statusButton != null)
                            {
                                _statusButton.SetOn( );
                            }
                            ScienceEventHandler.ScheduleExperimentUpdate( );
                        }
                        else
                        {
                            if (_statusButton != null)
                            {
                                _statusButton.SetOff( );
                            }
                        }
                    }
                }
            }
        }