mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-05-07 17:43:51 +00:00
fix(editor): WASD/QE flycam works while hovering ImGui panels
Camera key events were gated on io.WantCaptureKeyboard, which goes true whenever any ImGui panel has focus — not just when typing into a text widget. Hovering the cursor over a side panel silently disabled the flycam, which read as "WASD doesn't move the camera." Switched the gate to io.WantTextInput, which is true only while a text widget is actively accepting input. Now WASD/QE/Shift work exactly when they should: always, except while you're typing into a field.
This commit is contained in:
parent
c2eec42eb8
commit
b35c9341ec
1 changed files with 5 additions and 1 deletions
|
|
@ -442,7 +442,11 @@ void EditorApp::processEvents() {
|
|||
}
|
||||
}
|
||||
}
|
||||
if (!io.WantCaptureKeyboard)
|
||||
// Use WantTextInput (true only while typing into a text widget)
|
||||
// instead of WantCaptureKeyboard (true whenever any ImGui panel
|
||||
// has focus). Otherwise hovering over a panel silently disables
|
||||
// the WASD/QE flycam, which was the practical user complaint.
|
||||
if (!io.WantTextInput)
|
||||
camera_.processKeyEvent(event.key);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue