Skip to content
This repository was archived by the owner on May 9, 2023. It is now read-only.

Commit 513fcaa

Browse files
committed
Universal click-through prevention attempt
1 parent b41f721 commit 513fcaa

File tree

2 files changed

+15
-0
lines changed

2 files changed

+15
-0
lines changed

src/ExplorerCore.cs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,11 @@ public static void OnGUI()
8787
WindowManager.Instance.OnGUI();
8888
InspectUnderMouse.OnGUI();
8989

90+
if (WindowManager.IsMouseInWindow)
91+
{
92+
InputManager.ResetInputAxes();
93+
}
94+
9095
GUI.skin = origSkin;
9196
}
9297

src/Input/InputManager.cs

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,16 @@ public static void Init()
4242
public static bool GetMouseButtonDown(int btn) => inputModule.GetMouseButtonDown(btn);
4343
public static bool GetMouseButton(int btn) => inputModule.GetMouseButton(btn);
4444

45+
#if CPP
46+
internal delegate void d_ResetInputAxes();
47+
internal static d_ResetInputAxes ResetInputAxes_iCall =>
48+
IL2CPP.ResolveICall<d_ResetInputAxes>("UnityEngine.Input::ResetInputAxes");
49+
50+
public static void ResetInputAxes() => ResetInputAxes_iCall();
51+
#else
52+
public static void ResetInputAxes() => UnityEngine.Input.ResetInputAxes();
53+
#endif
54+
4555
//#if CPP
4656
//#pragma warning disable IDE1006
4757
// // public extern static string compositionString { get; }

0 commit comments

Comments
 (0)