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:
Kelsi 2026-05-07 09:20:01 -07:00
parent c2eec42eb8
commit b35c9341ec

View file

@ -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);
}