Add extension methods to Rectangle/RectangleF, remove a pile of ToPoint()'s.

This commit is contained in:
Paul Chote
2011-01-05 22:24:11 +13:00
parent 3e1db3e8ae
commit df460d7407
7 changed files with 24 additions and 13 deletions

View File

@@ -180,7 +180,7 @@ namespace OpenRA.Widgets
public string GetCursorOuter(int2 pos)
{
// Is the cursor on top of us?
if (!(IsVisible() && GetEventBounds().Contains(pos.ToPoint())))
if (!(IsVisible() && GetEventBounds().Contains(pos)))
return null;
// Do any of our children specify a cursor?
@@ -191,7 +191,7 @@ namespace OpenRA.Widgets
return cc;
}
return EventBounds.Contains(pos.ToPoint()) ? GetCursor(pos) : null;
return EventBounds.Contains(pos) ? GetCursor(pos) : null;
}
public static bool HandleInput(MouseInput mi)