Universal click-through prevention attempt

This commit is contained in:
sinaioutlander 2020-10-11 20:49:14 +11:00
parent b41f7211e5
commit 513fcaa534
2 changed files with 15 additions and 0 deletions

View File

@ -87,6 +87,11 @@ namespace Explorer
WindowManager.Instance.OnGUI();
InspectUnderMouse.OnGUI();
if (WindowManager.IsMouseInWindow)
{
InputManager.ResetInputAxes();
}
GUI.skin = origSkin;
}

View File

@ -42,6 +42,16 @@ namespace Explorer
public static bool GetMouseButtonDown(int btn) => inputModule.GetMouseButtonDown(btn);
public static bool GetMouseButton(int btn) => inputModule.GetMouseButton(btn);
#if CPP
internal delegate void d_ResetInputAxes();
internal static d_ResetInputAxes ResetInputAxes_iCall =>
IL2CPP.ResolveICall<d_ResetInputAxes>("UnityEngine.Input::ResetInputAxes");
public static void ResetInputAxes() => ResetInputAxes_iCall();
#else
public static void ResetInputAxes() => UnityEngine.Input.ResetInputAxes();
#endif
//#if CPP
//#pragma warning disable IDE1006
// // public extern static string compositionString { get; }