diff --git a/OpenRA.Game/GameRules/UserSettings.cs b/OpenRA.Game/GameRules/UserSettings.cs index 4120f5013d..6ff7ce9a33 100644 --- a/OpenRA.Game/GameRules/UserSettings.cs +++ b/OpenRA.Game/GameRules/UserSettings.cs @@ -54,7 +54,6 @@ namespace OpenRA.GameRules public string PlayerName = null; public readonly string[] InitialMods = { "ra" }; - public readonly string GameName = "OpenRA Game"; public readonly int ListenPort = 1234; public readonly int ExternalPort = 1234; public readonly bool InternetServer = true; diff --git a/OpenRA.Game/Widgets/Delegates/CreateServerMenuDelegate.cs b/OpenRA.Game/Widgets/Delegates/CreateServerMenuDelegate.cs index 68146c7b35..5705817607 100644 --- a/OpenRA.Game/Widgets/Delegates/CreateServerMenuDelegate.cs +++ b/OpenRA.Game/Widgets/Delegates/CreateServerMenuDelegate.cs @@ -50,8 +50,7 @@ namespace OpenRA.Widgets.Delegates // TODO: Get this from a mod chooser var mods = Game.Settings.InitialMods; - // TODO: Get this from a textbox - var gameName = Game.Settings.GameName; + var gameName = r.GetWidget("GAME_TITLE").Text; Server.Server.ServerMain(AdvertiseServerOnline, Game.Settings.MasterServer, gameName, Game.Settings.ListenPort, diff --git a/mods/cnc/menus.yaml b/mods/cnc/menus.yaml index a54858867e..371d8812d2 100644 --- a/mods/cnc/menus.yaml +++ b/mods/cnc/menus.yaml @@ -72,39 +72,55 @@ Container: Delegate:CreateServerMenuDelegate X:(WINDOW_RIGHT - WIDTH)/2 Y:(WINDOW_BOTTOM - HEIGHT)/2 - Width:450 - Height:145 + Width:400 + Height:180 Visible:false Children: Label@CREATESERVER_LABEL_TITLE: Id:CREATESERVER_LABEL_TITLE X:0 Y:20 - Width:250 + Width:400 Height:25 Text:Create Server Align:Center Bold:True + Label@GAME_TITLE: + Id:GAME_TITLE_LABEL + X:50 + Y:59 + Width:95 + Height:25 + Align: Right + Text:Game Title: + TextField@GAME_TITLE: + Id:GAME_TITLE + X:150 + Y:60 + Width:200 + MaxLength:50 + Height:25 + Text:OpenRA Game Checkbox@CREATESERVER_CHECKBOX_ONLINE: Id:CREATESERVER_CHECKBOX_ONLINE - X:100 - Y:60 + X:150 + Y:100 Width:300 Height:20 Text:Advertise game Online Button@CREATESERVER_BUTTON_START: Id:CREATESERVER_BUTTON_START - X:100 - Y:100 - Width:160 + X:130 + Y:PARENT_BOTTOM - 45 + Width:120 Height:25 Text:Create Bold:True Button@CREATESERVER_BUTTON_CANCEL: Id:CREATESERVER_BUTTON_CANCEL - X:270 - Y:100 - Width:160 + X:260 + Y:PARENT_BOTTOM - 45 + Width:120 Height:25 Text:Cancel Bold:True