Example #1
0
 public static void ClosePlanetWindow()
 {
     if (showPlanetWindow)
     {
         AHSettings.SavePosition("editor_signal_strenght_per_planet_window_position", rectPlanetWindow.position);
     }
     showPlanetWindow = false;
 }
Example #2
0
 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);
     }
 }
Example #4
0
 public static void CloseTargetWindow()
 {
     if (showTargetWindow)
     {
         AHSettings.SavePosition("editor_target_window_position", rectTargetWindow.position);
     }
     showTargetWindow = false;
     CloseTargetShipEditorWindow();
     CloseTargetShipFlightWindow();
     CloseTargetPartWindow();
 }
Example #5
0
        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);
        }
Example #6
0
        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);
        }
Example #7
0
 public void QuitEditor(GameEvents.FromToAction <GameScenes, GameScenes> eData)
 {
     AHSettings.WriteSave();
 }