Improve setting the lobby server title.

This commit is contained in:
Paul Chote
2013-05-10 22:21:29 +12:00
parent 41873d7cc5
commit 38f749ee47
4 changed files with 7 additions and 8 deletions

View File

@@ -97,6 +97,10 @@ namespace OpenRA.Mods.RA.Widgets.Logic
Game.AddChatLine += AddChatLine;
Game.ConnectionStateChanged += ConnectionStateChanged;
var name = lobby.GetOrNull<LabelWidget>("SERVER_NAME");
if (name != null)
name.GetText = () => orderManager.LobbyInfo.GlobalSettings.ServerName;
UpdateCurrentMap();
Players = lobby.Get<ScrollPanelWidget>("PLAYERS");
EditablePlayerTemplate = Players.Get("TEMPLATE_EDITABLE_PLAYER");
@@ -343,9 +347,6 @@ namespace OpenRA.Mods.RA.Widgets.Logic
else
throw new InvalidOperationException("Server's new map doesn't exist on your system and Downloading turned off");
Map = new Map(Game.modData.AvailableMaps[MapUid].Path);
var title = Ui.Root.Get<LabelWidget>("TITLE");
title.Text = orderManager.LobbyInfo.GlobalSettings.ServerName;
}
void UpdatePlayerList()