diff --git a/src/RealAntennasProject/MapUI/NetUIConfigurationWindow.cs b/src/RealAntennasProject/MapUI/NetUIConfigurationWindow.cs index c978139..f63c6c2 100644 --- a/src/RealAntennasProject/MapUI/NetUIConfigurationWindow.cs +++ b/src/RealAntennasProject/MapUI/NetUIConfigurationWindow.cs @@ -1,4 +1,5 @@ -using System; +using ClickThroughFix; +using System; using UnityEngine; namespace RealAntennas.MapUI @@ -10,7 +11,7 @@ public class NetUIConfigurationWindow : MonoBehaviour public void OnGUI() { - winPos = GUILayout.Window(GetHashCode(), winPos, WindowGUI, ModTag, GUILayout.MinWidth(200)); + winPos = ClickThruBlocker.GUILayoutWindow(GetHashCode(), winPos, WindowGUI, ModTag, GUILayout.MinWidth(200)); } private void WindowGUI(int ID) diff --git a/src/RealAntennasProject/Network/ConnectionDebugger.cs b/src/RealAntennasProject/Network/ConnectionDebugger.cs index 6b0c351..86ea249 100644 --- a/src/RealAntennasProject/Network/ConnectionDebugger.cs +++ b/src/RealAntennasProject/Network/ConnectionDebugger.cs @@ -1,6 +1,7 @@ using System.Collections.Generic; using UnityEngine; using Unity.Mathematics; +using ClickThroughFix; namespace RealAntennas.Network @@ -34,7 +35,7 @@ public void OnGUI() if (showUI) { GUI.skin = HighLogic.Skin; - Window = GUILayout.Window(GetHashCode(), Window, GUIDisplay, GUIName, HighLogic.Skin.window); + Window = ClickThruBlocker.GUILayoutWindow(GetHashCode(), Window, GUIDisplay, GUIName, HighLogic.Skin.window); } } private void GUIDisplay(int windowID) diff --git a/src/RealAntennasProject/PlannerGUI.cs b/src/RealAntennasProject/PlannerGUI.cs index 71aeebe..6029c07 100644 --- a/src/RealAntennasProject/PlannerGUI.cs +++ b/src/RealAntennasProject/PlannerGUI.cs @@ -1,4 +1,5 @@ -using System; +using ClickThroughFix; +using System; using System.Collections.Generic; using System.Linq; using UnityEngine; @@ -79,7 +80,7 @@ public void OnDestroy() public void OnGUI() { GUI.skin = HighLogic.Skin; - Window = GUILayout.Window(GetHashCode(), Window, GUIDisplay, "Antenna Planning", windowStyle, GUILayout.Width(GUIWidth), GUILayout.Height(GUIHeight)); + Window = ClickThruBlocker.GUILayoutWindow(GetHashCode(), Window, GUIDisplay, "Antenna Planning", windowStyle, GUILayout.Width(GUIWidth), GUILayout.Height(GUIHeight)); } void GUIDisplay(int windowID) diff --git a/src/RealAntennasProject/RealAntennas.csproj b/src/RealAntennasProject/RealAntennas.csproj index 4c6cee8..ac8ccd2 100644 --- a/src/RealAntennasProject/RealAntennas.csproj +++ b/src/RealAntennasProject/RealAntennas.csproj @@ -89,20 +89,21 @@ - - - - - - - - - - - - - - + + + + + + + + + + + + + + + diff --git a/src/RealAntennasProject/RealAntennasUI.cs b/src/RealAntennasProject/RealAntennasUI.cs index 67437f1..74177a2 100644 --- a/src/RealAntennasProject/RealAntennasUI.cs +++ b/src/RealAntennasProject/RealAntennasUI.cs @@ -1,4 +1,5 @@ -using KSP.UI.Screens; +using ClickThroughFix; +using KSP.UI.Screens; using System; using System.Collections.Generic; using UnityEngine; @@ -55,7 +56,7 @@ public void OnGUI() { if (showUI) { - winPos = GUILayout.Window(GetHashCode(), winPos, WindowGUI, modName, GUILayout.MinWidth(200)); + winPos = ClickThruBlocker.GUILayoutWindow(GetHashCode(), winPos, WindowGUI, modName, GUILayout.MinWidth(200)); } } diff --git a/src/RealAntennasProject/Targeting/AntennaTargetGUI.cs b/src/RealAntennasProject/Targeting/AntennaTargetGUI.cs index 61f2dc2..9606454 100644 --- a/src/RealAntennasProject/Targeting/AntennaTargetGUI.cs +++ b/src/RealAntennasProject/Targeting/AntennaTargetGUI.cs @@ -1,4 +1,5 @@ -using System.Collections.Generic; +using ClickThroughFix; +using System.Collections.Generic; using System.Linq; using UnityEngine; using static RealAntennas.Targeting.AntennaTarget; @@ -30,7 +31,7 @@ public void Start() public void OnGUI() { GUI.skin = HighLogic.Skin; - Window = GUILayout.Window(GetHashCode(), Window, GUIDisplay, GUIName, HighLogic.Skin.window); + Window = ClickThruBlocker.GUILayoutWindow(GetHashCode(), Window, GUIDisplay, GUIName, HighLogic.Skin.window); } void GUIDisplay(int windowID) diff --git a/src/RealAntennasProject/Targeting/RemoteAntennaControlUI.cs b/src/RealAntennasProject/Targeting/RemoteAntennaControlUI.cs index 1f71c24..08df0dc 100644 --- a/src/RealAntennasProject/Targeting/RemoteAntennaControlUI.cs +++ b/src/RealAntennasProject/Targeting/RemoteAntennaControlUI.cs @@ -1,4 +1,5 @@ -using System.Collections.Generic; +using ClickThroughFix; +using System.Collections.Generic; using System.Linq; using UnityEngine; @@ -22,7 +23,7 @@ public void Start() public void OnGUI() { GUI.skin = HighLogic.Skin; - Window = GUILayout.Window(GetHashCode(), Window, GUIDisplay, GUIName, HighLogic.Skin.window); + Window = ClickThruBlocker.GUILayoutWindow(GetHashCode(), Window, GUIDisplay, GUIName, HighLogic.Skin.window); } void GUIDisplay(int windowID)