Add map type and author to lobby.

This commit is contained in:
Paul Chote
2013-04-06 01:52:16 +13:00
parent 9d74734ec5
commit 5e2e284cbf
2 changed files with 29 additions and 1 deletions

View File

@@ -122,6 +122,20 @@ namespace OpenRA.Mods.RA.Widgets.Logic
mapTitle.GetText = () => Map.Title;
}
var mapType = lobby.GetOrNull<LabelWidget>("MAP_TYPE");
if (mapType != null)
{
mapType.IsVisible = () => Map != null;
mapType.GetText = () => Map.Type;
}
var mapAuthor = lobby.GetOrNull<LabelWidget>("MAP_AUTHOR");
if (mapAuthor != null)
{
mapAuthor.IsVisible = () => Map != null;
mapAuthor.GetText = () => "Created by {0}".F(Map.Author);
}
CountryNames = Rules.Info["world"].Traits.WithInterface<CountryInfo>()
.Where(c => c.Selectable)
.ToDictionary(a => a.Race, a => a.Name);

View File

@@ -34,11 +34,25 @@ Container@SERVER_LOBBY:
Height:192
Label@MAP_TITLE:
X:PARENT_RIGHT-15-WIDTH
Y:225
Y:227
Width:194
Height:25
Font:Bold
Align:Center
Label@MAP_TYPE:
X:PARENT_RIGHT-15-WIDTH
Y:242
Width:194
Height:25
Font:TinyBold
Align:Center
Label@MAP_AUTHOR:
X:PARENT_RIGHT-15-WIDTH
Y:254
Width:194
Height:25
Font:Tiny
Align:Center
ScrollPanel@PLAYERS:
X:15
Y:30