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

@@ -56,6 +56,9 @@ namespace OpenRA.Mods.RA.Widgets
if (key == ks.ToSelectionKey)
return ToSelection();
if (key == ks.ToggleStatusBarsKey)
return ToggleStatusBars();
// Put all functions that aren't unit-specific before this line!
if (!world.Selection.Actors.Any())
return false;
@@ -217,5 +220,11 @@ namespace OpenRA.Mods.RA.Widgets
worldRenderer.Viewport.Center(world.Selection.Actors);
return true;
}
bool ToggleStatusBars()
{
Game.Settings.Game.AlwaysShowStatusBars ^= true;
return true;
}
}
}