From 23eb077417a02771139fa8ce122de189bf86f9cc Mon Sep 17 00:00:00 2001 From: Paul Chote Date: Sat, 26 Mar 2011 10:35:58 +1300 Subject: [PATCH] #672 - Textfield support for home and end --- OpenRA.Game/Widgets/TextFieldWidget.cs | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/OpenRA.Game/Widgets/TextFieldWidget.cs b/OpenRA.Game/Widgets/TextFieldWidget.cs index 1ec7261430..46a6832e41 100644 --- a/OpenRA.Game/Widgets/TextFieldWidget.cs +++ b/OpenRA.Game/Widgets/TextFieldWidget.cs @@ -116,6 +116,18 @@ namespace OpenRA.Widgets return true; } + + if (e.KeyName == "home") + { + CursorPosition = 0; + return true; + } + + if (e.KeyName == "end") + { + CursorPosition = Text.Length; + return true; + } if (e.KeyName == "delete") {