mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-04-17 17:43:52 +00:00
fix(input): don't block hotkeys on WantCaptureKeyboard
This commit is contained in:
parent
251ed7733b
commit
e0828cc35c
2 changed files with 2 additions and 4 deletions
|
|
@ -2288,7 +2288,7 @@ void GameScreen::processTargetInput(game::GameHandler& gameHandler) {
|
||||||
refocusChatInput = true;
|
refocusChatInput = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
const bool textFocus = chatInputActive || refocusChatInput || io.WantTextInput || io.WantCaptureKeyboard;
|
const bool textFocus = chatInputActive || refocusChatInput || io.WantTextInput;
|
||||||
|
|
||||||
// Tab targeting (when keyboard not captured by UI)
|
// Tab targeting (when keyboard not captured by UI)
|
||||||
if (!io.WantCaptureKeyboard) {
|
if (!io.WantCaptureKeyboard) {
|
||||||
|
|
|
||||||
|
|
@ -47,9 +47,7 @@ bool KeybindingManager::isActionPressed(Action action, bool repeat) {
|
||||||
|
|
||||||
// When typing in a text field (e.g. chat input), never treat A-Z or 0-9 as shortcuts.
|
// When typing in a text field (e.g. chat input), never treat A-Z or 0-9 as shortcuts.
|
||||||
const ImGuiIO& io = ImGui::GetIO();
|
const ImGuiIO& io = ImGui::GetIO();
|
||||||
// Note: WantTextInput may not be set until the text widget is processed later in the
|
if (io.WantTextInput) {
|
||||||
// frame, but WantCaptureKeyboard remains true while an ImGui widget is active.
|
|
||||||
if (io.WantTextInput || io.WantCaptureKeyboard) {
|
|
||||||
if ((key >= ImGuiKey_A && key <= ImGuiKey_Z) ||
|
if ((key >= ImGuiKey_A && key <= ImGuiKey_Z) ||
|
||||||
(key >= ImGuiKey_0 && key <= ImGuiKey_9)) {
|
(key >= ImGuiKey_0 && key <= ImGuiKey_9)) {
|
||||||
return false;
|
return false;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue