mirror of
https://github.com/OpenMW/openmw.git
synced 2025-01-19 19:53:53 +00:00
Merge pull request #2768 from glassmancody/tabfix
Fix tab focus for pinned windows
This commit is contained in:
commit
b5ff32569b
1 changed files with 9 additions and 0 deletions
|
@ -116,6 +116,12 @@ void KeyboardNavigation::onFrame()
|
||||||
if (!mEnabled)
|
if (!mEnabled)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
if (!MWBase::Environment::get().getWindowManager()->isGuiMode())
|
||||||
|
{
|
||||||
|
MWBase::Environment::get().getWindowManager()->setKeyFocusWidget(nullptr);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
MyGUI::Widget* focus = MyGUI::InputManager::getInstance().getKeyFocusWidget();
|
MyGUI::Widget* focus = MyGUI::InputManager::getInstance().getKeyFocusWidget();
|
||||||
|
|
||||||
if (focus == mCurrentFocus)
|
if (focus == mCurrentFocus)
|
||||||
|
@ -215,6 +221,9 @@ bool KeyboardNavigation::injectKeyPress(MyGUI::KeyCode key, unsigned int text, b
|
||||||
|
|
||||||
bool KeyboardNavigation::switchFocus(int direction, bool wrap)
|
bool KeyboardNavigation::switchFocus(int direction, bool wrap)
|
||||||
{
|
{
|
||||||
|
if (!MWBase::Environment::get().getWindowManager()->isGuiMode())
|
||||||
|
return false;
|
||||||
|
|
||||||
MyGUI::Widget* focus = MyGUI::InputManager::getInstance().getKeyFocusWidget();
|
MyGUI::Widget* focus = MyGUI::InputManager::getInstance().getKeyFocusWidget();
|
||||||
|
|
||||||
bool isCycle = (direction == D_Prev || direction == D_Next);
|
bool isCycle = (direction == D_Prev || direction == D_Next);
|
||||||
|
|
Loading…
Reference in a new issue