Chatbox can be deselect by pressing enter while it's empty

This commit is contained in:
Joonas Rikkonen
2017-12-02 17:47:05 +02:00
parent 1cc33d221d
commit f55d028799

View File

@@ -80,7 +80,11 @@ namespace Barotrauma.Networking
{
textBox.TextColor = ChatMessage.MessageColor[(int)ChatMessageType.Default];
if (string.IsNullOrWhiteSpace(message)) return false;
if (string.IsNullOrWhiteSpace(message))
{
if (textBox == chatMsgBox) textBox.Deselect();
return false;
}
if (this == GameMain.Server)
{