mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-03-14 10:21:09 +00:00
proper game mode detection
This commit is contained in:
parent
8d6169ef9b
commit
40ccbc99bb
@ -116,8 +116,7 @@ void KeyboardNavigation::onFrame()
|
||||
if (!mEnabled)
|
||||
return;
|
||||
|
||||
MWGui::GuiMode mode = MWBase::Environment::get().getWindowManager()->getMode();
|
||||
if (mode == GM_None)
|
||||
if (!MWBase::Environment::get().getWindowManager()->isGuiMode())
|
||||
{
|
||||
MWBase::Environment::get().getWindowManager()->setKeyFocusWidget(nullptr);
|
||||
return;
|
||||
@ -222,8 +221,7 @@ bool KeyboardNavigation::injectKeyPress(MyGUI::KeyCode key, unsigned int text, b
|
||||
|
||||
bool KeyboardNavigation::switchFocus(int direction, bool wrap)
|
||||
{
|
||||
MWGui::GuiMode mode = MWBase::Environment::get().getWindowManager()->getMode();
|
||||
if (mode == GM_None)
|
||||
if (!MWBase::Environment::get().getWindowManager()->isGuiMode())
|
||||
return false;
|
||||
|
||||
MyGUI::Widget* focus = MyGUI::InputManager::getInstance().getKeyFocusWidget();
|
||||
|
Loading…
x
Reference in New Issue
Block a user