Improve contrasted range circle rendering.

This commit is contained in:
Paul Chote
2013-10-14 23:28:22 +13:00
parent d2d73a32a2
commit 839419635d
6 changed files with 14 additions and 20 deletions

View File

@@ -189,15 +189,15 @@ namespace OpenRA.Graphics
}
}
public void DrawRangeCircleWithContrast(Color fg, float2 location, float range, Color bg, int offset)
public void DrawRangeCircleWithContrast(Color fg, float2 location, float range, Color bg)
{
if (offset > 0)
{
DrawRangeCircle(bg, location, range + (float)offset / Game.CellSize);
DrawRangeCircle(bg, location, range - (float)offset / Game.CellSize);
}
var wlr = Game.Renderer.WorldLineRenderer;
var oldWidth = wlr.LineWidth;
wlr.LineWidth = 3;
DrawRangeCircle(bg, location, range);
wlr.LineWidth = 1;
DrawRangeCircle(fg, location, range);
wlr.LineWidth = oldWidth;
}
public void RefreshPalette()