Add a "Game Name" textfield to server creation
This commit is contained in:
@@ -54,7 +54,6 @@ namespace OpenRA.GameRules
|
|||||||
public string PlayerName = null;
|
public string PlayerName = null;
|
||||||
public readonly string[] InitialMods = { "ra" };
|
public readonly string[] InitialMods = { "ra" };
|
||||||
|
|
||||||
public readonly string GameName = "OpenRA Game";
|
|
||||||
public readonly int ListenPort = 1234;
|
public readonly int ListenPort = 1234;
|
||||||
public readonly int ExternalPort = 1234;
|
public readonly int ExternalPort = 1234;
|
||||||
public readonly bool InternetServer = true;
|
public readonly bool InternetServer = true;
|
||||||
|
|||||||
@@ -50,8 +50,7 @@ namespace OpenRA.Widgets.Delegates
|
|||||||
// TODO: Get this from a mod chooser
|
// TODO: Get this from a mod chooser
|
||||||
var mods = Game.Settings.InitialMods;
|
var mods = Game.Settings.InitialMods;
|
||||||
|
|
||||||
// TODO: Get this from a textbox
|
var gameName = r.GetWidget<TextFieldWidget>("GAME_TITLE").Text;
|
||||||
var gameName = Game.Settings.GameName;
|
|
||||||
|
|
||||||
Server.Server.ServerMain(AdvertiseServerOnline, Game.Settings.MasterServer,
|
Server.Server.ServerMain(AdvertiseServerOnline, Game.Settings.MasterServer,
|
||||||
gameName, Game.Settings.ListenPort,
|
gameName, Game.Settings.ListenPort,
|
||||||
|
|||||||
@@ -72,39 +72,55 @@ Container:
|
|||||||
Delegate:CreateServerMenuDelegate
|
Delegate:CreateServerMenuDelegate
|
||||||
X:(WINDOW_RIGHT - WIDTH)/2
|
X:(WINDOW_RIGHT - WIDTH)/2
|
||||||
Y:(WINDOW_BOTTOM - HEIGHT)/2
|
Y:(WINDOW_BOTTOM - HEIGHT)/2
|
||||||
Width:450
|
Width:400
|
||||||
Height:145
|
Height:180
|
||||||
Visible:false
|
Visible:false
|
||||||
Children:
|
Children:
|
||||||
Label@CREATESERVER_LABEL_TITLE:
|
Label@CREATESERVER_LABEL_TITLE:
|
||||||
Id:CREATESERVER_LABEL_TITLE
|
Id:CREATESERVER_LABEL_TITLE
|
||||||
X:0
|
X:0
|
||||||
Y:20
|
Y:20
|
||||||
Width:250
|
Width:400
|
||||||
Height:25
|
Height:25
|
||||||
Text:Create Server
|
Text:Create Server
|
||||||
Align:Center
|
Align:Center
|
||||||
Bold:True
|
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:
|
Checkbox@CREATESERVER_CHECKBOX_ONLINE:
|
||||||
Id:CREATESERVER_CHECKBOX_ONLINE
|
Id:CREATESERVER_CHECKBOX_ONLINE
|
||||||
X:100
|
X:150
|
||||||
Y:60
|
Y:100
|
||||||
Width:300
|
Width:300
|
||||||
Height:20
|
Height:20
|
||||||
Text:Advertise game Online
|
Text:Advertise game Online
|
||||||
Button@CREATESERVER_BUTTON_START:
|
Button@CREATESERVER_BUTTON_START:
|
||||||
Id:CREATESERVER_BUTTON_START
|
Id:CREATESERVER_BUTTON_START
|
||||||
X:100
|
X:130
|
||||||
Y:100
|
Y:PARENT_BOTTOM - 45
|
||||||
Width:160
|
Width:120
|
||||||
Height:25
|
Height:25
|
||||||
Text:Create
|
Text:Create
|
||||||
Bold:True
|
Bold:True
|
||||||
Button@CREATESERVER_BUTTON_CANCEL:
|
Button@CREATESERVER_BUTTON_CANCEL:
|
||||||
Id:CREATESERVER_BUTTON_CANCEL
|
Id:CREATESERVER_BUTTON_CANCEL
|
||||||
X:270
|
X:260
|
||||||
Y:100
|
Y:PARENT_BOTTOM - 45
|
||||||
Width:160
|
Width:120
|
||||||
Height:25
|
Height:25
|
||||||
Text:Cancel
|
Text:Cancel
|
||||||
Bold:True
|
Bold:True
|
||||||
|
|||||||
Reference in New Issue
Block a user