fixed some bugs in gui text box

This commit is contained in:
Dylan Wilson
2017-05-23 20:42:09 +10:00
parent b9e02362be
commit 4eae631af2
3 changed files with 8 additions and 3 deletions
@@ -80,11 +80,17 @@ namespace MonoGame.Extended.Gui.Controls
if (SelectionStart < Text.Length)
SelectionStart++;
break;
case Keys.Home:
SelectionStart = 0;
break;
case Keys.End:
SelectionStart = Text.Length;
break;
default:
if (args.Character != null)
{
Text = Text.Insert(SelectionStart, args.Character.ToString());
SelectionStart++;
Text += args.Character;
}
break;
}