Move Game.Controller.HandleInput into a widget; works but is hacky

This commit is contained in:
Paul Chote
2010-07-25 17:45:53 +12:00
parent f61421edd0
commit 2248320af7
10 changed files with 110 additions and 86 deletions

View File

@@ -17,7 +17,7 @@ using OpenRA.Graphics;
namespace OpenRA.Widgets
{
public abstract class Widget : IHandleInput
public abstract class Widget
{
// Info defined in YAML
public string Id = null;
@@ -205,7 +205,7 @@ namespace OpenRA.Widgets
public static int TicksSinceLastMove = 0;
public static int2 LastMousePos;
public bool HandleInput(World world, MouseInput mi)
public static bool HandleInput(World world, MouseInput mi)
{
if (SelectedWidget != null && SelectedWidget.HandleMouseInputOuter(mi))
return true;