Added ability to quick hide the flight engineer windows.
[VesselSimulator.git] / KerbalEngineer / Flight / DisplayStack.cs
blob:a/KerbalEngineer/Flight/DisplayStack.cs -> blob:b/KerbalEngineer/Flight/DisplayStack.cs
--- a/KerbalEngineer/Flight/DisplayStack.cs
+++ b/KerbalEngineer/Flight/DisplayStack.cs
@@ -1,4 +1,5 @@
-//     Kerbal Engineer Redux

+// 

+//     Kerbal Engineer Redux

 // 

 //     Copyright (C) 2014 CYBUTEK

 // 

@@ -89,6 +90,8 @@
             get { return this.showControlBar; }

             set { this.showControlBar = value; }

         }

+

+        public bool Hidden { get; set; }

 

         #endregion

 

@@ -137,6 +140,18 @@
 

         #endregion

 

+        #region Updating

+

+        private void Update()

+        {

+            if (Input.GetKeyDown(KeyCode.Backslash))

+            {

+                this.Hidden = !this.Hidden;

+            }

+        }

+

+        #endregion

+

         #region Drawing

 

         /// <summary>

@@ -151,7 +166,7 @@
                 this.resizeRequested = false;

             }

 

-            if (SectionLibrary.Instance.NumberOfStackSections > 0 || this.ShowControlBar)

+            if (!this.Hidden && (SectionLibrary.Instance.NumberOfStackSections > 0 || this.ShowControlBar))

             {

                 this.windowPosition = GUILayout.Window(this.windowId, this.windowPosition, this.Window, string.Empty, this.windowStyle).ClampToScreen();

             }