Add country definitions

This commit is contained in:
ScottNZ
2014-10-04 21:52:39 +13:00
parent 5b011e6baf
commit c4110bad45
5 changed files with 49 additions and 6 deletions

View File

@@ -18,7 +18,11 @@ namespace OpenRA.Mods.RA.Widgets.Logic
[ObjectCreator.UseCtor]
public AddRaceSuffixLogic(Widget widget, World world)
{
var suffix = "-" + world.LocalPlayer.Country.Race;
string race;
if (!ChromeMetrics.TryGet("RaceSuffix-" + world.LocalPlayer.Country.Race, out race))
race = world.LocalPlayer.Country.Race;
var suffix = "-" + race;
if (widget is ButtonWidget)
((ButtonWidget)widget).Background += suffix;
else if (widget is ImageWidget)