#289 lobby title should show servername -- fixed

This commit is contained in:
Chris Forbes
2010-10-13 20:45:03 +13:00
parent dca77956cb
commit 4afd8ad783
5 changed files with 9 additions and 2 deletions

View File

@@ -62,6 +62,7 @@ namespace OpenRA.Network
public class Global
{
public string ServerName;
public string Map;
public string[] Mods = { "ra" }; // mod names
public int OrderLatency = 3;

View File

@@ -64,6 +64,7 @@ namespace OpenRA.Server
lobbyInfo.GlobalSettings.RandomSeed = randomSeed;
lobbyInfo.GlobalSettings.Map = map;
lobbyInfo.GlobalSettings.AllowCheats = settings.Server.AllowCheats;
lobbyInfo.GlobalSettings.ServerName = settings.Server.Name;
LoadMap(); // populates the Session's slots, too.

View File

@@ -180,6 +180,9 @@ namespace OpenRA.Widgets.Delegates
if (MapUid == orderManager.LobbyInfo.GlobalSettings.Map) return;
MapUid = orderManager.LobbyInfo.GlobalSettings.Map;
Map = Game.modData.AvailableMaps[MapUid];
var title = Widget.RootWidget.GetWidget<LabelWidget>("LOBBY_TITLE");
title.Text = "OpenRA Multiplayer Lobby - " + orderManager.LobbyInfo.GlobalSettings.ServerName;
}
bool hasJoined = false;

View File

@@ -7,6 +7,7 @@ Background@SERVER_LOBBY:
Height:600
Children:
Label@LOBBY_TITLE:
Id:LOBBY_TITLE
X:0
Y:20
Align:Center
@@ -16,7 +17,7 @@ Background@SERVER_LOBBY:
Text:OpenRA Multiplayer Lobby
Background@LOBBY_MAP_BG:
X:PARENT_RIGHT-268
Y:39
Y:50
Width:252
Height:252
Background:dialog3

View File

@@ -8,6 +8,7 @@ Background@SERVER_LOBBY:
Visible:true
Children:
Label@LOBBY_TITLE:
Id:LOBBY_TITLE
X:0
Y:20
Align:Center
@@ -17,7 +18,7 @@ Background@SERVER_LOBBY:
Text:OpenRA Multiplayer Lobby
Background@LOBBY_MAP_BG:
X:PARENT_RIGHT-268
Y:39
Y:50
Width:252
Height:252
Background:dialog3