get the server location from the IP

and show it in the game browser, closes #2555
This commit is contained in:
Matthias Mailänder
2013-08-07 19:23:22 +02:00
parent 9d40b430dc
commit fb042056b0
3 changed files with 17 additions and 0 deletions

View File

@@ -238,6 +238,10 @@ namespace OpenRA.Mods.RA.Widgets.Logic
version.GetText = () => GenerateModsLabel(game);
version.IsVisible = () => !game.CompatibleVersion();
var location = item.Get<LabelWidget>("LOCATION");
location.GetText = () => LobbyUtils.LookupCountry(game.Address.Split(':')[0]);
location.IsVisible = () => game.CompatibleVersion();
if (!canJoin)
{
title.GetColor = () => Color.Gray;
@@ -246,6 +250,7 @@ namespace OpenRA.Mods.RA.Widgets.Logic
state.GetColor = () => Color.Gray;
ip.GetColor = () => Color.Gray;
version.GetColor = () => Color.Gray;
location.GetColor = () => Color.Gray;
}
if (!Filtered(game))