colorize the latency tooltip

so people get it faster
now that we display 4 lines of information
This commit is contained in:
Matthias Mailänder
2013-08-08 11:55:05 +02:00
parent 669a95479a
commit 7f77e5a5f3

View File

@@ -67,6 +67,7 @@ namespace OpenRA.Mods.RA.Widgets.Logic
admin.IsVisible = () => orderManager.LobbyInfo.ClientWithIndex(clientIndex).IsAdmin;
latency.GetText = () => "Latency: {0}".F(LobbyUtils.LatencyDescription(orderManager.LobbyInfo.ClientWithIndex(clientIndex).Latency));
latency.GetColor = () => LobbyUtils.LatencyColor(orderManager.LobbyInfo.ClientWithIndex(clientIndex).Latency);
var ipAddress = orderManager.LobbyInfo.ClientWithIndex(clientIndex).IpAddress;
if ((ipAddress == null || ipAddress == "127.0.0.1") && UPnP.NatDevice != null)
ipAddress = UPnP.NatDevice.GetExternalIP().ToString();