Resets chat text field in lobby when Esc is pressed.
This commit is contained in:
@@ -523,9 +523,7 @@ namespace OpenRA.Mods.Common.Widgets.Logic
|
||||
|
||||
chatLabel = lobby.Get<LabelWidget>("LABEL_CHATTYPE");
|
||||
var chatTextField = lobby.Get<TextFieldWidget>("CHAT_TEXTFIELD");
|
||||
|
||||
chatTextField.TakeKeyboardFocus();
|
||||
|
||||
chatTextField.OnEnterKey = () =>
|
||||
{
|
||||
if (chatTextField.Text.Length == 0)
|
||||
@@ -538,6 +536,7 @@ namespace OpenRA.Mods.Common.Widgets.Logic
|
||||
chatTextField.Text = "";
|
||||
return true;
|
||||
};
|
||||
|
||||
chatTextField.OnTabKey = () =>
|
||||
{
|
||||
var previousText = chatTextField.Text;
|
||||
@@ -550,6 +549,8 @@ namespace OpenRA.Mods.Common.Widgets.Logic
|
||||
return true;
|
||||
};
|
||||
|
||||
chatTextField.OnEscKey = () => { chatTextField.Text = ""; return true; };
|
||||
|
||||
chatPanel = lobby.Get<ScrollPanelWidget>("CHAT_DISPLAY");
|
||||
chatTemplate = chatPanel.Get("CHAT_TEMPLATE");
|
||||
chatPanel.RemoveChildren();
|
||||
|
||||
Reference in New Issue
Block a user