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); } } } } } }
// Shows or hides the Status Window if the KSP toolbar is visible and the toolbar button is toggled on. private void UpdateStatusVisibility(bool NewVisibility) { if (!_active) { return; } // _logger.Trace("UpdateChecklistVisibility"); _statusWindow.SetVisible(NewVisibility); if (_statusWindow.IsVisible( )) { ScienceEventHandler.ScheduleExperimentUpdate( ); } }
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( ); } } } } } }