Added 2 settings for unit health bars: always show unit health, and team health bar colors

This commit is contained in:
Curtis Shmyr
2013-11-10 11:48:41 -07:00
parent 90fa7743c3
commit d30f60809b
8 changed files with 106 additions and 44 deletions

View File

@@ -146,6 +146,16 @@ namespace OpenRA.Graphics
foreach (var t in g)
t.RenderAfterWorld(this);
if (!world.IsShellmap && Game.Settings.Game.AlwaysShowStatusBars)
{
foreach (var g in world.Actors.Where(a => !a.Destroyed
&& a.HasTrait<Selectable>()
&& !world.FogObscures(a)
&& !world.Selection.Actors.Contains(a)))
DrawRollover(g);
}
Game.Renderer.Flush();
}
@@ -177,7 +187,7 @@ namespace OpenRA.Graphics
{
var selectable = unit.TraitOrDefault<Selectable>();
if (selectable != null)
selectable.DrawRollover(this, unit);
selectable.DrawRollover(this);
}
public void DrawRangeCircle(Color c, float2 location, float range)