Added new support for onHide/ShowUI events for F2 functionality.
Added new support for onHide/ShowUI events for F2 functionality.

--- a/API/VOIDCore.cs
+++ b/API/VOIDCore.cs
@@ -71,6 +71,8 @@
 		public abstract bool configDirty { get; set; }
 		public abstract bool powerAvailable	{ get; protected set; }
 
+		public virtual bool gameUIHidden { get; protected set; }
+
 		public abstract IList<IVOID_Module> Modules { get; }
 
 		public abstract float UpdateTimer { get; protected set; }
@@ -159,6 +161,11 @@
 
 		public void OnGUI()
 		{
+			if (this.gameUIHidden)
+			{
+				return;
+			}
+
 			if (Event.current.type == EventType.Repaint || Event.current.isMouse)
 			{
 				if (this.onPreRender != null)

--- a/VOIDCore_Generic.cs
+++ b/VOIDCore_Generic.cs
@@ -1239,6 +1239,20 @@
 			this.VOIDSettingsPath = string.Format("{0}/VOIDConfig.xml", this.SaveGamePath);
 
 			this.FactoryReset = false;
+
+			GameEvents.onHideUI.Add(() =>
+				{
+					this.gameUIHidden = true;
+					this.StopGUI();
+				}
+			);
+
+			GameEvents.onShowUI.Add(() =>
+				{
+					this.gameUIHidden = false;
+					this.StartGUI();
+				}
+			);
 		}
 
 		public override void Dispose()