Merge pull request #6281 from mizipzor/tab-completion

Added tab completion to in-game and lobby chat.
This commit is contained in:
Paul Chote
2014-08-24 17:29:38 +12:00
4 changed files with 106 additions and 15 deletions

View File

@@ -30,6 +30,7 @@ namespace OpenRA.Widgets
public Func<bool> OnEnterKey = () => false;
public Func<bool> OnTabKey = () => false;
public Func<bool> OnEscKey = () => false;
public Func<bool> OnAltKey = () => false;
public Action OnLoseFocus = () => { };
public Action OnTextEdited = () => { };
public int CursorPosition { get; set; }
@@ -121,6 +122,9 @@ namespace OpenRA.Widgets
if (e.Key == Keycode.ESCAPE && OnEscKey())
return true;
if (e.Key == Keycode.LALT && OnAltKey())
return true;
if (e.Key == Keycode.LEFT)
{
if (CursorPosition > 0)