Show map title in the lobby
This commit is contained in:
@@ -113,6 +113,7 @@ namespace OpenRA.Mods.Cnc.Widgets.Logic
|
||||
NewSpectatorTemplate = Players.GetWidget("TEMPLATE_NEW_SPECTATOR");
|
||||
|
||||
var mapPreview = lobby.GetWidget<MapPreviewWidget>("MAP_PREVIEW");
|
||||
mapPreview.IsVisible = () => Map != null;
|
||||
mapPreview.Map = () => Map;
|
||||
mapPreview.OnMouseDown = mi =>
|
||||
{
|
||||
@@ -134,6 +135,10 @@ namespace OpenRA.Mods.Cnc.Widgets.Logic
|
||||
return true;
|
||||
};
|
||||
|
||||
var mapTitle = lobby.GetWidget<LabelWidget>("MAP_TITLE");
|
||||
mapTitle.IsVisible = () => Map != null;
|
||||
mapTitle.GetText = () => Map.Title;
|
||||
|
||||
mapPreview.SpawnColors = () =>
|
||||
{
|
||||
var spawns = Map.SpawnPoints;
|
||||
|
||||
@@ -31,6 +31,14 @@ Container@SERVER_LOBBY:
|
||||
Y:1
|
||||
Width:192
|
||||
Height:192
|
||||
Label@MAP_TITLE:
|
||||
Id:MAP_TITLE
|
||||
X:PARENT_RIGHT-15-WIDTH
|
||||
Y:225
|
||||
Width:194
|
||||
Height:25
|
||||
Font:Bold
|
||||
Align:Center
|
||||
Checkbox@ALLOWCHEATS_CHECKBOX:
|
||||
Id:ALLOWCHEATS_CHECKBOX
|
||||
X:PARENT_RIGHT-209
|
||||
|
||||
Reference in New Issue
Block a user