mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-03-29 15:36:41 +00:00
fixed tab focus for pinned windows
This commit is contained in:
parent
b42d097739
commit
8e741a0d0b
1 changed files with 11 additions and 0 deletions
|
@ -116,6 +116,13 @@ void KeyboardNavigation::onFrame()
|
||||||
if (!mEnabled)
|
if (!mEnabled)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
MWGui::GuiMode mode = MWBase::Environment::get().getWindowManager()->getMode();
|
||||||
|
if (mode == GM_None)
|
||||||
|
{
|
||||||
|
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 +222,10 @@ bool KeyboardNavigation::injectKeyPress(MyGUI::KeyCode key, unsigned int text, b
|
||||||
|
|
||||||
bool KeyboardNavigation::switchFocus(int direction, bool wrap)
|
bool KeyboardNavigation::switchFocus(int direction, bool wrap)
|
||||||
{
|
{
|
||||||
|
MWGui::GuiMode mode = MWBase::Environment::get().getWindowManager()->getMode();
|
||||||
|
if (mode == GM_None)
|
||||||
|
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