mirror of
https://github.com/NuclearPowered/Reactor.git
synced 2026-10-19 15:51:54 +00:00
Reset input only if you click inside imgui
This commit is contained in:
2 files changed
+2
-2
No files matched your search
@@ -117,7 +117,7 @@ namespace Reactor.Extensions
|
||||
Rect = Rect.ResetSize();
|
||||
Rect = GUILayout.Window(Id, Rect, Func, Title, new Il2CppReferenceArray<GUILayoutOption>(0));
|
||||
|
||||
if (Rect.Contains(new Vector2(Input.mousePosition.x, Screen.height - Input.mousePosition.y)))
|
||||
if ((Input.GetMouseButtonDown(0) || Input.GetMouseButtonDown(1)) && Rect.Contains(new Vector2(Input.mousePosition.x, Screen.height - Input.mousePosition.y)))
|
||||
{
|
||||
Input.ResetInputAxes();
|
||||
}
|
||||
|
||||
@@ -8,7 +8,7 @@ namespace Reactor.Patches
|
||||
{
|
||||
internal static class UiFocusPatch
|
||||
{
|
||||
// [HarmonyPatch(typeof(PassiveButtonManager), nameof(PassiveButtonManager.HandleFocus))]
|
||||
// [HarmonyPatch(typeof(PassiveButtonManager), nameof(PassiveButtonManager.HandleMouseOver))]
|
||||
[HarmonyPatch]
|
||||
public static class HandleFocusPatch
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user