Example #1
0
 internal static void Close()
 {
     if (dialog != null)
     {
         WindowManager2.SavePosition(dialog);
         dialog.Dismiss();
     }
     dialog       = null;
     optionDialog = null;
 }
Example #2
0
 internal static void Close()
 {
     if (dialog != null)
     {
         WindowManager2.SavePosition(dialog);
         dialog.Dismiss();
     }
     dialog       = null;
     optionDialog = null;
     InputLockManager.RemoveControlLock("KK_KSC");
 }
Example #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;
        }
        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();
            }
        }
Example #5
0
 internal static void CreateMultiOptionDialog()
 {
     windowRect   = new Rect(WindowManager2.GetPosition(windowName), new Vector2(windowWidth, windowHeight));
     optionDialog = new MultiOptionDialog(windowName, windowMessage, windowTitle, null, windowRect, content.ToArray());
     optionDialog.OnFixedUpdate += PlaceToParent;
 }