remove duplicated box-drawing code from WICW

This commit is contained in:
Chris Forbes
2011-07-11 22:35:02 +12:00
committed by Paul Chote
parent 2a7be6debd
commit 1196948a13

View File

@@ -42,14 +42,7 @@ namespace OpenRA.Widgets
return; return;
} }
var a = selbox.Value.First; Game.Renderer.LineRenderer.DrawRect( selbox.Value.First, selbox.Value.Second, Color.White );
var b = new float2(selbox.Value.Second.X - a.X, 0);
var c = new float2(0, selbox.Value.Second.Y - a.Y);
Game.Renderer.LineRenderer.DrawLine(a, a + b, Color.White, Color.White);
Game.Renderer.LineRenderer.DrawLine(a + b, a + b + c, Color.White, Color.White);
Game.Renderer.LineRenderer.DrawLine(a + b + c, a + c, Color.White, Color.White);
Game.Renderer.LineRenderer.DrawLine(a, a + c, Color.White, Color.White);
foreach (var u in SelectActorsInBox(world, selbox.Value.First, selbox.Value.Second)) foreach (var u in SelectActorsInBox(world, selbox.Value.First, selbox.Value.Second))
worldRenderer.DrawRollover(u); worldRenderer.DrawRollover(u);