pass WorldRenderer to Widget.Draw, DrawInner

This commit is contained in:
Bob
2010-10-12 01:29:07 +13:00
parent 597dba8584
commit 6ea2a06e4b
33 changed files with 159 additions and 137 deletions

View File

@@ -13,7 +13,8 @@ using System.Drawing;
using System.Linq;
using OpenRA.FileFormats;
using OpenRA.Orders;
using OpenRA.Traits;
using OpenRA.Traits;
using OpenRA.Graphics;
namespace OpenRA.Widgets
{
@@ -26,7 +27,7 @@ namespace OpenRA.Widgets
this.world = world;
}
public override void DrawInner()
public override void DrawInner( WorldRenderer wr )
{
var selbox = SelectionBox;
if (selbox == null) return;
@@ -41,7 +42,7 @@ namespace OpenRA.Widgets
Game.Renderer.LineRenderer.DrawLine(a, a + c, Color.White, Color.White);
foreach (var u in SelectActorsInBox(world, selbox.Value.First, selbox.Value.Second))
Game.worldRenderer.DrawSelectionBox(u, Color.Yellow);
wr.DrawSelectionBox(u, Color.Yellow);
}
float2 dragStart, dragEnd;