[Client] Retain hidden mode for chat window when set

0.8.0
David Cernat 3 years ago
parent 6b1c83f629
commit d45db97808

@ -39,7 +39,7 @@ namespace mwmp
mHistory->setNeedKeyFocus(false); mHistory->setNeedKeyFocus(false);
windowState = 0; windowState = CHAT_DISABLED;
mCommandLine->setVisible(0); mCommandLine->setVisible(0);
delay = 3; // 3 sec. delay = 3; // 3 sec.
} }
@ -49,6 +49,8 @@ namespace mwmp
// Give keyboard focus to the combo box whenever the console is // Give keyboard focus to the combo box whenever the console is
// turned on // turned on
setEditState(0); setEditState(0);
if (windowState == CHAT_DISABLED)
windowState = CHAT_ENABLED; windowState = CHAT_ENABLED;
} }
@ -114,7 +116,7 @@ namespace mwmp
void GUIChat::print(const std::string &msg, const std::string &color) void GUIChat::print(const std::string &msg, const std::string &color)
{ {
if (windowState == 2 && !isVisible()) if (windowState == CHAT_HIDDENMODE && !isVisible())
{ {
setVisible(true); setVisible(true);
} }

Loading…
Cancel
Save