clean up low-level keyboard input

This commit is contained in:
Chris Forbes
2010-07-15 20:06:00 +12:00
parent bf50a2961e
commit 071c790097
8 changed files with 67 additions and 59 deletions

View File

@@ -498,18 +498,18 @@ namespace OpenRA
{ ')', '0' },
};
public static void HandleKeyPress(KeyPressEventArgs e, Modifiers modifiers)
public static void HandleKeyPress(KeyInput e)
{
int sync = world.SyncHash();
if (chrome.HandleKeyPress(e, modifiers))
if (chrome.HandleKeyPress(e))
return;
var c = RemapKeys.ContainsKey(e.KeyChar) ? RemapKeys[e.KeyChar] : e.KeyChar;
if (c >= '0' && c <= '9')
Game.controller.selection.DoControlGroup(world,
c - '0', modifiers);
c - '0', e.Modifiers);
if (c == 08)
Game.controller.GotoNextBase();