From 9b3cedd37f7c659230e1d0c6c5a5d706ae8d9e48 Mon Sep 17 00:00:00 2001 From: Paul Chote Date: Fri, 1 Jul 2011 23:37:53 +1200 Subject: [PATCH] Show map title in the lobby --- OpenRA.Mods.Cnc/Widgets/Logic/CncLobbyLogic.cs | 5 +++++ mods/cnc/chrome/lobby.yaml | 8 ++++++++ 2 files changed, 13 insertions(+) diff --git a/OpenRA.Mods.Cnc/Widgets/Logic/CncLobbyLogic.cs b/OpenRA.Mods.Cnc/Widgets/Logic/CncLobbyLogic.cs index 0ff2a3b64e..745a51a110 100644 --- a/OpenRA.Mods.Cnc/Widgets/Logic/CncLobbyLogic.cs +++ b/OpenRA.Mods.Cnc/Widgets/Logic/CncLobbyLogic.cs @@ -113,6 +113,7 @@ namespace OpenRA.Mods.Cnc.Widgets.Logic NewSpectatorTemplate = Players.GetWidget("TEMPLATE_NEW_SPECTATOR"); var mapPreview = lobby.GetWidget("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("MAP_TITLE"); + mapTitle.IsVisible = () => Map != null; + mapTitle.GetText = () => Map.Title; + mapPreview.SpawnColors = () => { var spawns = Map.SpawnPoints; diff --git a/mods/cnc/chrome/lobby.yaml b/mods/cnc/chrome/lobby.yaml index a4ef911c8c..333fe9f74f 100644 --- a/mods/cnc/chrome/lobby.yaml +++ b/mods/cnc/chrome/lobby.yaml @@ -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