Merge pull request #3000 from Mailaender/dynamic-orderlag

Display Ping of joining Clients in Lobby and use it to calculate OrderLatency
This commit is contained in:
Chris Forbes
2013-04-20 16:57:00 -07:00
6 changed files with 88 additions and 14 deletions

View File

@@ -478,6 +478,9 @@ namespace OpenRA.Mods.RA.Widgets.Logic
template.Get<LabelWidget>("NAME").GetText = () => client.Name;
if (client.IsAdmin)
template.Get<LabelWidget>("NAME").Font = "Bold";
if (client.Ping > -1)
template.Get<LabelWidget>("NAME").GetColor = () => LobbyUtils.GetPingColor(client.Ping);
var color = template.Get<ColorBlockWidget>("COLOR");
color.GetColor = () => client.ColorRamp.GetColor(0);