diff --git a/apps/openmw/mwmp/GUI/GUIChat.cpp b/apps/openmw/mwmp/GUI/GUIChat.cpp index 41ce155ad..d2fcc3758 100644 --- a/apps/openmw/mwmp/GUI/GUIChat.cpp +++ b/apps/openmw/mwmp/GUI/GUIChat.cpp @@ -184,7 +184,7 @@ namespace mwmp { editState = state; mCommandLine->setVisible(editState); - MyGUI::InputManager::getInstance().setKeyFocusWidget(editState ? mCommandLine : nullptr); + MWBase::Environment::get().getWindowManager()->setKeyFocusWidget(editState ? mCommandLine : nullptr); } void GUIChat::pressedSay() diff --git a/apps/openmw/mwmp/GUI/TextInputDialog.cpp b/apps/openmw/mwmp/GUI/TextInputDialog.cpp index 1bf52e47c..a52b59cc3 100644 --- a/apps/openmw/mwmp/GUI/TextInputDialog.cpp +++ b/apps/openmw/mwmp/GUI/TextInputDialog.cpp @@ -23,7 +23,7 @@ namespace mwmp okButton->eventMouseButtonClick += MyGUI::newDelegate(this, &TextInputDialog::onOkClicked); // Make sure the edit box has focus - MyGUI::InputManager::getInstance().setKeyFocusWidget(mTextEdit); + MWBase::Environment::get().getWindowManager()->setKeyFocusWidget(mTextEdit); } void TextInputDialog::setNextButtonShow(bool shown) @@ -56,7 +56,7 @@ namespace mwmp { WindowModal::onOpen(); // Make sure the edit box has focus - MyGUI::InputManager::getInstance().setKeyFocusWidget(mTextEdit); + MWBase::Environment::get().getWindowManager()->setKeyFocusWidget(mTextEdit); } bool TextInputDialog::exit() @@ -71,7 +71,7 @@ namespace mwmp if (mTextEdit->getCaption() == "") { //MWBase::Environment::get().getWindowManager()->messageBox ("#{sNotifyMessage37}"); - MyGUI::InputManager::getInstance().setKeyFocusWidget(mTextEdit); + MWBase::Environment::get().getWindowManager()->setKeyFocusWidget(mTextEdit); } else eventDone(this);