Exemple #1
0
 // Update() fires every frame.
 public void Update()
 {
     RateLimitedLogger.Update();
     if ((Input.GetKey(KeyCode.LeftAlt) || Input.GetKey(KeyCode.RightAlt)) && Input.GetKeyDown(KeyCode.H))
     {
         // Linuxgurugamer added this scene check to keep HyperEdit off in the editors.
         if (HighLogic.LoadedScene == GameScenes.FLIGHT || HighLogic.LoadedScene == GameScenes.TRACKSTATION)
         {
             if (View.Window.GameObject.GetComponents <View.Window>().Any(w => w.Title == "HyperEdit"))
             {
                 if (_appLauncherButton == null)
                 {
                     View.Window.CloseAll();
                 }
                 else
                 {
                     _appLauncherButton.SetFalse();
                 }
             }
             else
             {
                 if (_appLauncherButton == null)
                 {
                     CreateCoreView();
                 }
                 else
                 {
                     _appLauncherButton.SetTrue();
                 }
             }
         }
     }
 }
Exemple #2
0
 public void Update()
 {
     RateLimitedLogger.Update();
     if ((Input.GetKey(KeyCode.LeftAlt) || Input.GetKey(KeyCode.RightAlt)) && Input.GetKeyDown(KeyCode.H))
     {
         if (View.Window.GameObject.GetComponents <View.Window>().Any(w => w.Title == "HyperEdit"))
         {
             if (_appLauncherButton == null)
             {
                 View.Window.CloseAll();
             }
             else
             {
                 _appLauncherButton.SetFalse();
             }
         }
         else
         {
             if (_appLauncherButton == null)
             {
                 CreateCoreView();
             }
             else
             {
                 _appLauncherButton.SetTrue();
             }
         }
     }
 }