public static void ClosePlanetWindow() { if (showPlanetWindow) { AHSettings.SavePosition("editor_signal_strenght_per_planet_window_position", rectPlanetWindow.position); } showPlanetWindow = false; }
public static void CloseMainWindow() { if (showMainWindow) { AHSettings.SavePosition("editor_main_window_position", rectMainWindow.position); } showMainWindow = false; }
public void QuitEditor(GameEvents.FromToAction <GameScenes, GameScenes> eData) { AHSettings.WriteSave(); if (HighLogic.CurrentGame.Mode == Game.Modes.MISSION_BUILDER) { Destroy(this); } }
public static void CloseTargetWindow() { if (showTargetWindow) { AHSettings.SavePosition("editor_target_window_position", rectTargetWindow.position); } showTargetWindow = false; CloseTargetShipEditorWindow(); CloseTargetShipFlightWindow(); CloseTargetPartWindow(); }
void OnDestroy() { // Save windows position : AHSettings.SavePosition("flight_main_window_position", rectActiveConnectWindow.position); AHSettings.SavePosition("flight_map_view_window_position", rectSelectCircleTypeWindow.position); AHSettings.WriteSave(); DestroyMarkers(); RemoveToolbarButton(); GameEvents.onGUIApplicationLauncherDestroyed.Remove(RemoveToolbarButton); GameEvents.onVesselWasModified.Remove(VesselModified); GameEvents.onVesselSwitching.Remove(VesselDestroy); GameEvents.onVesselDestroy.Remove(VesselDestroy); GameEvents.OnMapEntered.Remove(EnteringMap); GameEvents.OnMapExited.Remove(ExitingMap); }
public void OnDestroy() { AHSettings.SavePosition("tracking_station_main_window_position", rectMainWindow.position); AHSettings.SavePosition("tracking_station_ship_window_position", rectEditorShipWindow.position); AHSettings.WriteSave(); if (listMarkers != null) { DestroyMarkers(); } GameEvents.onPlanetariumTargetChanged.Remove(NewTarget); GameEvents.OnMapFocusChange.Remove(NewTarget); GameEvents.CommNet.OnCommStatusChange.Remove(CommNetUpdate); // GUI RemoveToolbarButton(); GameEvents.onGUIApplicationLauncherReady.Remove(AddToolbarButton); GameEvents.onGUIApplicationLauncherDestroyed.Remove(RemoveToolbarButton); }
public void QuitEditor(GameEvents.FromToAction <GameScenes, GameScenes> eData) { AHSettings.WriteSave(); }