mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-03-29 16:06:44 +00:00
[Client] Prevent constant loss of key focus for chat window
This commit is contained in:
parent
dc0ce09ab6
commit
95e5e6d33d
1 changed files with 20 additions and 1 deletions
|
@ -8,6 +8,17 @@
|
|||
|
||||
#include <components/debug/debuglog.hpp>
|
||||
|
||||
/*
|
||||
Start of tes3mp addition
|
||||
|
||||
Include additional headers for multiplayer purposes
|
||||
*/
|
||||
#include "../mwmp/Main.hpp"
|
||||
#include "../mwmp/GUIController.hpp"
|
||||
/*
|
||||
End of tes3mp addition
|
||||
*/
|
||||
|
||||
#include "../mwbase/windowmanager.hpp"
|
||||
#include "../mwbase/environment.hpp"
|
||||
|
||||
|
@ -116,7 +127,15 @@ void KeyboardNavigation::onFrame()
|
|||
if (!mEnabled)
|
||||
return;
|
||||
|
||||
if (!MWBase::Environment::get().getWindowManager()->isGuiMode())
|
||||
/*
|
||||
Start of tes3mp change (major)
|
||||
|
||||
Don't clear key focus widget when not in menus if the chat is currently focused
|
||||
*/
|
||||
if (!MWBase::Environment::get().getWindowManager()->isGuiMode() && !mwmp::Main::get().getGUIController()->getChatEditState())
|
||||
/*
|
||||
End of tes3mp change (major)
|
||||
*/
|
||||
{
|
||||
MWBase::Environment::get().getWindowManager()->setKeyFocusWidget(nullptr);
|
||||
return;
|
||||
|
|
Loading…
Reference in a new issue