Esempio n. 1
0
 private void CloseGUI()
 {
     showGUI           = guiMode.None;
     exchangeContainer = null;
     availableContents = null;
     if (HighLogic.LoadedSceneIsEditor)
     {
         EditorLogic.fetch.Unlock("KAS DisableEditorClickthrough");
     }
 }
Esempio n. 2
0
 public void ViewContents()
 {
     if (showGUI != guiMode.None)
     {
         CloseGUI();
     }
     else
     {
         CloseAllGUI();
         guiMainWindowPos = new Rect(Screen.width / 2, Screen.height / 2, 10, 10);
         showGUI          = guiMode.View;
         fxSndOpen.audio.Play();
     }
 }
Esempio n. 3
0
 public void TakeContents(Vessel evaVessel)
 {
     if (showGUI != guiMode.None)
     {
         CloseGUI();
         fxSndClose.audio.Play();
     }
     else
     {
         CloseAllGUI();
         guiMainWindowPos = new Rect(Screen.width / 2, Screen.height / 2, 10, 10);
         showGUI          = guiMode.Take;
         fxSndOpen.audio.Play();
     }
 }
Esempio n. 4
0
 public void EditContents()
 {
     if (showGUI != guiMode.None)
     {
         CloseGUI();
         fxSndClose.audio.Play();
     }
     else
     {
         CloseAllGUI();
         availableContents = GetAvailableContents();
         guiMainWindowPos  = new Rect(Screen.width / 3, 35, 10, 10);
         showGUI           = guiMode.Edit;
         fxSndOpen.audio.Play();
     }
 }
Esempio n. 5
0
 public void ExchangeContents(KASModuleContainer moduleContainer)
 {
     if (showGUI != guiMode.None)
     {
         CloseGUI();
         fxSndClose.audio.Play();
     }
     else
     {
         CloseAllGUI();
         exchangeContainer = moduleContainer;
         guiMainWindowPos  = new Rect(Screen.width / 2, Screen.height / 2, 10, 10);
         showGUI           = guiMode.Exchange;
         fxSndOpen.audio.Play();
     }
 }
Esempio n. 6
0
 public void EditContents()
 {
     if (showGUI != guiMode.None)
     {
         CloseGUI();
         fxSndClose.audio.Play();
     }
     else
     {
         CloseAllGUI();
         availableContents = GetAvailableContents();
         guiMainWindowPos = new Rect(Screen.width / 3, 35, 10, 10);
         showGUI = guiMode.Edit;
         fxSndOpen.audio.Play();
     }
 }
Esempio n. 7
0
 private void CloseGUI()
 {
     showGUI = guiMode.None;
     exchangeContainer = null;
     availableContents = null;
     if (HighLogic.LoadedSceneIsEditor) EditorLogic.fetch.Unlock();
 }
Esempio n. 8
0
 public void ViewContents()
 {
     if (showGUI != guiMode.None)
     {
         CloseGUI();
     }
     else
     {
         CloseAllGUI();
         guiMainWindowPos = new Rect(Screen.width / 2, Screen.height / 2, 10, 10);
         showGUI = guiMode.View;
         fxSndOpen.audio.Play();
     }
 }
Esempio n. 9
0
 public void TakeContents(Vessel evaVessel)
 {
     if (showGUI != guiMode.None)
     {
         CloseGUI();
         fxSndClose.audio.Play();
     }
     else
     {
         CloseAllGUI();
         guiMainWindowPos = new Rect(Screen.width / 2, Screen.height / 2, 10, 10);
         showGUI = guiMode.Take;
         fxSndOpen.audio.Play();
     }
 }
Esempio n. 10
0
 public void ExchangeContents(KASModuleContainer moduleContainer)
 {
     if (showGUI != guiMode.None)
     {
         CloseGUI();
         fxSndClose.audio.Play();
     }
     else
     {
         CloseAllGUI();
         exchangeContainer = moduleContainer;
         guiMainWindowPos = new Rect(Screen.width / 2, Screen.height / 2, 10, 10);
         showGUI = guiMode.Exchange;
         fxSndOpen.audio.Play();
     }
 }