Remove some duplication

This commit is contained in:
Paul Chote
2010-07-16 19:02:09 +12:00
parent 4c8f85b36b
commit 84ac8d9d16
5 changed files with 50 additions and 77 deletions

View File

@@ -63,7 +63,15 @@ namespace OpenRA.Widgets
DrawRGBA(ss, new float2(x, y));
}
}
public static void FillRectWithColor(Rectangle r, Color c)
{
Game.chrome.lineRenderer.FillRect(new RectangleF(
Game.viewport.Location.X + r.X,
Game.viewport.Location.Y + r.Y,
r.Width, r.Height), c);
}
public static int[] GetBorderSizes(string collection)
{
var images = new[] { "border-t", "border-b", "border-l", "border-r" };