mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-01-20 07:23:51 +00:00
proper game mode detection
This commit is contained in:
parent
8e741a0d0b
commit
a34fe1d9b2
1 changed files with 2 additions and 4 deletions
|
@ -116,8 +116,7 @@ void KeyboardNavigation::onFrame()
|
||||||
if (!mEnabled)
|
if (!mEnabled)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
MWGui::GuiMode mode = MWBase::Environment::get().getWindowManager()->getMode();
|
if (!MWBase::Environment::get().getWindowManager()->isGuiMode())
|
||||||
if (mode == GM_None)
|
|
||||||
{
|
{
|
||||||
MWBase::Environment::get().getWindowManager()->setKeyFocusWidget(nullptr);
|
MWBase::Environment::get().getWindowManager()->setKeyFocusWidget(nullptr);
|
||||||
return;
|
return;
|
||||||
|
@ -222,8 +221,7 @@ 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 (!MWBase::Environment::get().getWindowManager()->isGuiMode())
|
||||||
if (mode == GM_None)
|
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
MyGUI::Widget* focus = MyGUI::InputManager::getInstance().getKeyFocusWidget();
|
MyGUI::Widget* focus = MyGUI::InputManager::getInstance().getKeyFocusWidget();
|
||||||
|
|
Loading…
Reference in a new issue