Exemple #1
0
 private void CloseGUI()
 {
     showGUI           = guiMode.None;
     exchangeContainer = null;
     availableContents = null;
     if (HighLogic.LoadedSceneIsEditor)
     {
         EditorLogic.fetch.Unlock("KAS DisableEditorClickthrough");
     }
 }
Exemple #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();
     }
 }
Exemple #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();
     }
 }
Exemple #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();
     }
 }
Exemple #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();
     }
 }
 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();
     }
 }
 private void CloseGUI()
 {
     showGUI = guiMode.None;
     exchangeContainer = null;
     availableContents = null;
     if (HighLogic.LoadedSceneIsEditor) EditorLogic.fetch.Unlock();
 }
 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();
     }
 }
 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();
     }
 }
 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();
     }
 }