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

@@ -18,9 +18,6 @@
*/
#endregion
using System;
using System.Collections.Generic;
using System.Drawing;
using System.Linq;
using OpenRA.FileFormats;
using OpenRA.Graphics;
@@ -83,12 +80,12 @@ namespace OpenRA
}
public bool HandleKeyPress(System.Windows.Forms.KeyPressEventArgs e, Modifiers modifiers)
public bool HandleKeyPress(KeyInput e)
{
if (Widget.SelectedWidget != null)
return Widget.SelectedWidget.HandleKeyPressOuter(e, modifiers);
return Widget.SelectedWidget.HandleKeyPressOuter(e);
if (rootWidget.HandleKeyPressOuter(e, modifiers))
if (rootWidget.HandleKeyPressOuter(e))
return true;
return false;
}