internal static void Close()
 {
     if (dialog != null)
     {
         WindowManager2.SavePosition(dialog);
         dialog.Dismiss();
     }
     dialog       = null;
     optionDialog = null;
 }
Пример #2
0
 internal static void Close()
 {
     if (dialog != null)
     {
         WindowManager2.SavePosition(dialog);
         dialog.Dismiss();
     }
     dialog       = null;
     optionDialog = null;
     InputLockManager.RemoveControlLock("KK_KSC");
 }
Пример #3
0
        internal static void Close()
        {
            if (EditorGUI.instance.IsOpen() && (EditorGUI.selectedInstance == staticInstance))
            {
                staticInstance.HighlightObject(XKCDColors.Green_Yellow);
            }

            if (dialog != null)
            {
                WindowManager2.SavePosition(dialog);
                dialog.Dismiss();
            }

            dialog       = null;
            optionDialog = null;
        }
Пример #4
0
        internal static void LaunchVessel()
        {
            if (selectedVessel == null)
            {
                Log.UserError("This was not ment to be called like this");
                return;
            }

            ProtoVessel vesselToLaunch = selectedVessel;

            Log.Normal(selectedStoredVessel.vesselName);

            selectedHangar.storedVessels.Remove(selectedStoredVessel);
            selectedVessel = null;
            selectedHangar = null;
            selectedPart   = null;

            // remove the control lock. which was created by the KSC Manager window
            InputLockManager.RemoveControlLock("KK_KSC");



            if (KSCManager.isOpen)
            {
                WindowManager2.SavePosition(KSCManager.dialog);
            }

            GamePersistence.SaveGame("persistent", HighLogic.SaveFolder, SaveMode.OVERWRITE);

            selectedFacility = null;

            if (!useFromFlight)
            {
                useFromFlight = false;
                FlightDriver.StartAndFocusVessel("persistent", FlightGlobals.Vessels.IndexOf(vesselToLaunch.vesselRef));
            }
            else
            {
                useFromFlight = false;
                vesselToLaunch.vesselRef.Load();
                vesselToLaunch.vesselRef.MakeActive();
            }
        }