From 5482ad0482cc242069a80df6a3adb21bd38b8600 Mon Sep 17 00:00:00 2001 From: scrawl <720642+scrawl@users.noreply.github.com> Date: Fri, 22 Sep 2017 17:03:31 +0200 Subject: [PATCH] Fix tab completion in console to not cycle key focus --- apps/openmw/mwgui/keyboardnavigation.cpp | 3 +++ files/mygui/openmw_console.layout | 1 + 2 files changed, 4 insertions(+) diff --git a/apps/openmw/mwgui/keyboardnavigation.cpp b/apps/openmw/mwgui/keyboardnavigation.cpp index 840a12f1e..ba09ce369 100644 --- a/apps/openmw/mwgui/keyboardnavigation.cpp +++ b/apps/openmw/mwgui/keyboardnavigation.cpp @@ -82,6 +82,9 @@ bool KeyboardNavigation::switchFocus(int direction, bool wrap) if (!isButtonFocus() && direction != D_Prev && direction != D_Next) return false; + if ((direction == D_Prev || direction == D_Next) && focus->getUserString("AcceptTab") == "true") + return false; + MyGUI::Widget* window = MyGUI::InputManager::getInstance().getKeyFocusWidget(); while (window->getParent()) window = window->getParent(); diff --git a/files/mygui/openmw_console.layout b/files/mygui/openmw_console.layout index 854568f9b..103cdcf14 100644 --- a/files/mygui/openmw_console.layout +++ b/files/mygui/openmw_console.layout @@ -18,6 +18,7 @@ +