From d45db978089bb5a3487751736bea097224d74743 Mon Sep 17 00:00:00 2001 From: David Cernat Date: Wed, 27 Apr 2022 09:10:25 +0300 Subject: [PATCH] [Client] Retain hidden mode for chat window when set --- apps/openmw/mwmp/GUI/GUIChat.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/apps/openmw/mwmp/GUI/GUIChat.cpp b/apps/openmw/mwmp/GUI/GUIChat.cpp index 4d244d6e9..38c3ecd43 100644 --- a/apps/openmw/mwmp/GUI/GUIChat.cpp +++ b/apps/openmw/mwmp/GUI/GUIChat.cpp @@ -39,7 +39,7 @@ namespace mwmp mHistory->setNeedKeyFocus(false); - windowState = 0; + windowState = CHAT_DISABLED; mCommandLine->setVisible(0); delay = 3; // 3 sec. } @@ -49,7 +49,9 @@ namespace mwmp // Give keyboard focus to the combo box whenever the console is // turned on setEditState(0); - windowState = CHAT_ENABLED; + + if (windowState == CHAT_DISABLED) + windowState = CHAT_ENABLED; } void GUIChat::onClose() @@ -114,7 +116,7 @@ namespace mwmp void GUIChat::print(const std::string &msg, const std::string &color) { - if (windowState == 2 && !isVisible()) + if (windowState == CHAT_HIDDENMODE && !isVisible()) { setVisible(true); }