Пример #1
0
 public void LaunchScreenOpenEvent(GameEvents.VesselSpawnInfo v)
 {
     if (!KCT_GUI.IsPrimarilyDisabled)
     {
         // PopupDialog.SpawnPopupDialog(new Vector2(0.5f, 0.5f), new Vector2(0.5f, 0.5f), "Warning!", "To launch vessels you must first build them in the VAB or SPH, then launch them through the main KCT window in the Space Center!", "Ok", false, HighLogic.UISkin);
         //open the build list to the right page
         string selection = v.craftSubfolder.Contains("SPH") ? "SPH" : "VAB";
         KCT_GUI.ToggleVisibility(true);
         KCT_GUI.SelectList("");
         KCT_GUI.SelectList(selection);
         KCTDebug.Log($"Opening the GUI to the {selection}");
     }
 }
Пример #2
0
        public void launchScreenOpenEvent(GameEvents.VesselSpawnInfo v)
        {
            const string logBlockName = nameof(KCTEvents) + "." + nameof(launchScreenOpenEvent);

            using (EntryExitLogger.EntryExitLog(logBlockName, EntryExitLoggerOptions.All))
            {
                if (!KCT_GUI.PrimarilyDisabled)
                {
                    // PopupDialog.SpawnPopupDialog(new Vector2(0.5f, 0.5f), new Vector2(0.5f, 0.5f), "Warning!", "To launch vessels you must first build them in the VAB or SPH, then launch them through the main KCT window in the Space Center!", "Ok", false, HighLogic.UISkin);
                    //open the build list to the right page
                    string selection = (v.craftSubfolder.Contains("SPH")) ? "SPH" : "VAB";
                    KCT_GUI.ClickOn();
                    KCT_GUI.SelectList("");
                    KCT_GUI.SelectList(selection);
                    Log.Trace("Opening the GUI to the " + selection);
                }
            }
        }
Пример #3
0
 public void launchScreenOpenEvent(GameEvents.VesselSpawnInfo v)
 {
     if (!KCT_GUI.PrimarilyDisabled)
     {
         //KCT_GameStates.flightSimulated = true; //no longer needed b/c that gui wont appear anymore!
         // PopupDialog.SpawnPopupDialog(new Vector2(0.5f, 0.5f), new Vector2(0.5f, 0.5f), "Warning!", "To launch vessels you must first build them in the VAB or SPH, then launch them through the main KCT window in the Space Center!", "Ok", false, HighLogic.UISkin);
         //open the build list to the right page
         string selection = "VAB";
         if (v.craftSubfolder.Contains("SPH"))
         {
             selection = "SPH";
         }
         KCT_GUI.ClickOn();
         KCT_GUI.SelectList("");
         KCT_GUI.SelectList(selection);
         KCTDebug.Log("Opening the GUI to the " + selection);
     }
 }