Merge pull request #2810 from bidifx/cancel-chat

cancel ingame-chat with esc
This commit is contained in:
Chris Forbes
2013-03-20 17:18:18 -07:00
2 changed files with 9 additions and 1 deletions

View File

@@ -44,6 +44,7 @@ Also thanks to:
* Psydev
* Raymond Martineau (mart0258)
* Riderr3
* Sascha Biedermann (bidifx)
* Tim Mylemans (gecko)
* Tirili
* Vladimir Komarov (VrKomarov)

View File

@@ -79,7 +79,14 @@ namespace OpenRA.Widgets
if (composing)
{
if (e.KeyName == "backspace")
if (e.KeyName == "escape")
{
composing = false;
content = "";
LoseFocus();
return true;
}
else if (e.KeyName == "backspace")
{
if (content.Length > 0)
content = content.Remove(content.Length - 1);