From fd845198ad4bae930c5dee44a932cc6723269e21 Mon Sep 17 00:00:00 2001 From: Battlerax Date: Wed, 22 Feb 2017 15:03:59 -0600 Subject: [PATCH] [Client] You can now cancel the chat box by pressing enter without a message. --- apps/openmw/mwmp/GUIChat.cpp | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/apps/openmw/mwmp/GUIChat.cpp b/apps/openmw/mwmp/GUIChat.cpp index 449f77144..a8cbd656b 100644 --- a/apps/openmw/mwmp/GUIChat.cpp +++ b/apps/openmw/mwmp/GUIChat.cpp @@ -68,7 +68,15 @@ namespace mwmp void GUIChat::acceptCommand(MyGUI::EditBox *_sender) { const std::string &cm = mCommandLine->getOnlyText(); - if (cm.empty()) return; + + // If they enter nothing, then it should be canceled. + // Otherwise, there's no way of closing without having text. + if (cm.empty()) + { + mCommandLine->setCaption(""); + SetEditState(0); + return; + } LOG_MESSAGE_SIMPLE(Log::LOG_INFO, "Player: %s", cm.c_str());