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

@@ -26,7 +26,6 @@ using OpenRA.FileFormats;
using OpenRA.Graphics;
using OpenRA.Orders;
using OpenRA.Traits;
using System.Windows.Forms;
namespace OpenRA.Widgets
{
@@ -142,12 +141,12 @@ namespace OpenRA.Widgets
paletteOpen = true;
currentTab = produces;
}
public override bool HandleKeyPress (KeyPressEventArgs e, Modifiers modifiers)
public override bool HandleKeyPress(KeyInput e)
{
if (e.KeyChar == 09)
TabChange((Control.ModifierKeys & Keys.Shift) == Keys.Shift);
TabChange(e.Modifiers.HasModifier(Modifiers.Shift));
DoBuildingHotkey(Char.ToLowerInvariant(e.KeyChar), Game.world);
return true;
}