Commit f5d3c158 authored by ElderLich's avatar ElderLich

Bug Fix: Mouse Cursor Disappears When Focusing Text Input on macOS/Linux

On macOS/Linux, clicking deck-name or username input fields can hide/lock the mouse cursor due to navigation input being processed while typing. Cursor only reappears after leaving the window area. Input focus should keep the cursor visible.
parent aced1337
...@@ -165,7 +165,7 @@ namespace MDPro3 ...@@ -165,7 +165,7 @@ namespace MDPro3
MouseMovedEvent(); MouseMovedEvent();
} }
if(MoveInput != Vector2.zero) if(MoveInput != Vector2.zero && !InputFieldActivating())
{ {
if (Cursor.lockState == CursorLockMode.None) if (Cursor.lockState == CursorLockMode.None)
{ {
...@@ -456,10 +456,11 @@ namespace MDPro3 ...@@ -456,10 +456,11 @@ namespace MDPro3
if (current == null) return false; if (current == null) return false;
if (!current.TryGetComponent<Selectable>(out var selectable)) if (!current.TryGetComponent<Selectable>(out var selectable))
return false; return false;
if(selectable is TMP_InputField inputField) if (selectable is TMP_InputField tmpInputField)
return inputField.isFocused; return tmpInputField.isFocused;
else if (selectable is InputField legacyInputField)
return false; return legacyInputField.isFocused;
return false;
} }
#endregion #endregion
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment