get the server location from the IP
and show it in the game browser, closes #2555
This commit is contained in:
@@ -238,6 +238,10 @@ namespace OpenRA.Mods.RA.Widgets.Logic
|
|||||||
version.GetText = () => GenerateModsLabel(game);
|
version.GetText = () => GenerateModsLabel(game);
|
||||||
version.IsVisible = () => !game.CompatibleVersion();
|
version.IsVisible = () => !game.CompatibleVersion();
|
||||||
|
|
||||||
|
var location = item.Get<LabelWidget>("LOCATION");
|
||||||
|
location.GetText = () => LobbyUtils.LookupCountry(game.Address.Split(':')[0]);
|
||||||
|
location.IsVisible = () => game.CompatibleVersion();
|
||||||
|
|
||||||
if (!canJoin)
|
if (!canJoin)
|
||||||
{
|
{
|
||||||
title.GetColor = () => Color.Gray;
|
title.GetColor = () => Color.Gray;
|
||||||
@@ -246,6 +250,7 @@ namespace OpenRA.Mods.RA.Widgets.Logic
|
|||||||
state.GetColor = () => Color.Gray;
|
state.GetColor = () => Color.Gray;
|
||||||
ip.GetColor = () => Color.Gray;
|
ip.GetColor = () => Color.Gray;
|
||||||
version.GetColor = () => Color.Gray;
|
version.GetColor = () => Color.Gray;
|
||||||
|
location.GetColor = () => Color.Gray;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!Filtered(game))
|
if (!Filtered(game))
|
||||||
|
|||||||
@@ -68,6 +68,12 @@ Container@SERVERBROWSER_PANEL:
|
|||||||
Y:40
|
Y:40
|
||||||
Align:Right
|
Align:Right
|
||||||
Height:25
|
Height:25
|
||||||
|
Label@LOCATION:
|
||||||
|
Width:140
|
||||||
|
X:PARENT_RIGHT-150
|
||||||
|
Y:40
|
||||||
|
Align:Right
|
||||||
|
Height:25
|
||||||
Label@PROGRESS_LABEL:
|
Label@PROGRESS_LABEL:
|
||||||
X:(PARENT_RIGHT - WIDTH) / 2
|
X:(PARENT_RIGHT - WIDTH) / 2
|
||||||
Y:PARENT_BOTTOM / 2 - HEIGHT
|
Y:PARENT_BOTTOM / 2 - HEIGHT
|
||||||
|
|||||||
@@ -95,6 +95,12 @@ Background@JOINSERVER_BG:
|
|||||||
Y:40
|
Y:40
|
||||||
Align:Right
|
Align:Right
|
||||||
Height:25
|
Height:25
|
||||||
|
Label@LOCATION:
|
||||||
|
Width:140
|
||||||
|
X:PARENT_RIGHT-150
|
||||||
|
Y:40
|
||||||
|
Align:Right
|
||||||
|
Height:25
|
||||||
Label@PROGRESS_LABEL:
|
Label@PROGRESS_LABEL:
|
||||||
X:(PARENT_RIGHT - WIDTH) / 2
|
X:(PARENT_RIGHT - WIDTH) / 2
|
||||||
Y:PARENT_BOTTOM / 2 - HEIGHT
|
Y:PARENT_BOTTOM / 2 - HEIGHT
|
||||||
|
|||||||
Reference in New Issue
Block a user