Add map type and author to lobby.
This commit is contained in:
@@ -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);
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user