rewrite the Diplomacy panel

now with scrollbars, fixes #3443
This commit is contained in:
Matthias Mailänder
2013-08-17 12:28:05 +02:00
parent fea8dc11cf
commit 60b3601ffa
6 changed files with 134 additions and 116 deletions

View File

@@ -348,5 +348,16 @@ namespace OpenRA.Mods.RA.Widgets.Logic
{
parent.Get<ImageWidget>("STATUS_IMAGE").IsVisible = () => c.IsReady || c.Bot != null;
}
public static void AddPlayerFlagAndName(ScrollItemWidget template, Player player)
{
var flag = template.Get<ImageWidget>("FLAG");
flag.GetImageName = () => player.Country.Race;
flag.GetImageCollection = () => "flags";
var playerName = template.Get<LabelWidget>("PLAYER");
playerName.GetText = () => player.PlayerName + (player.WinState == WinState.Undefined ? "" : " (" + player.WinState + ")");
playerName.GetColor = () => player.Color.RGB;
}
}
}