mirror of
https://github.com/TES3MP/TES3MP.git
synced 2025-09-25 22:10:41 -04:00
Merge pull request #163 from Battlerax/battlerax-dev
[Client] You can now cancel the chat box by pressing enter without a message
This commit is contained in:
commit
b373a3e0ba
@ -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());
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user