1 <?xml version="1.0" encoding="utf-8"?>
5 <script directory="gui/common/"/>
6 <script directory="gui/gamesetup_mp/"/>
8 <!-- Add a translucent black background to fade out the menu page -->
9 <object type="image" sprite="ModernFade"/>
11 <object name="multiplayerPages" type="image" style="ModernDialog" size="50%-230 50%-120 50%+230 50%+120">
17 <object style="ModernLabelText" type="text" size="50%-128 0%-16 50%+128 16">
18 <translatableAttribute id="caption">Multiplayer</translatableAttribute>
21 <object name="pageJoin" size="0 32 100% 100%" hidden="true">
23 <object type="text" style="ModernLabelText" size="0 0 100% 30">
24 <translatableAttribute id="caption">Joining an existing game.</translatableAttribute>
27 <object type="text" size="20 36 50% 66" style="ModernRightLabelText">
28 <translatableAttribute id="caption">Player Name:</translatableAttribute>
31 <object name="joinPlayerName" type="input" size="50%+10 40 100%-20 64" style="ModernInput">
33 this.caption = multiplayerName();
37 <object type="text" size="20 76 50% 106" style="ModernRightLabelText">
38 <translatableAttribute id="caption">Server Hostname or IP:</translatableAttribute>
41 <object name="joinServer" type="input" size="50%+10 80 100%-20 104" style="ModernInput">
43 this.caption = Engine.ConfigDB_GetValue("user", "multiplayerserver");
47 <object type="text" size="20 116 50% 146" style="ModernRightLabelText">
48 <translatableAttribute id="caption">Server Port:</translatableAttribute>
51 <object name="joinPort" type="input" size="50%+10 120 100%-20 144" style="ModernInput">
52 <translatableAttribute id="tooltip">Leave blank to use the default port.</translatableAttribute>
54 this.caption = getValidPort(Engine.ConfigDB_GetValue("user", "multiplayerjoining.port"));
57 this.caption = getValidPort(this.caption);
62 <object name="pageHost" size="0 32 100% 100%" hidden="true">
64 <object type="text" style="ModernLabelText" size="0 0 100% 30">
65 <translatableAttribute id="caption">Set up your server to host.</translatableAttribute>
68 <object name="hostPlayerNameWrapper" hidden="true">
69 <object type="text" size="20 36 50% 66" style="ModernRightLabelText">
70 <translatableAttribute id="caption">Player Name:</translatableAttribute>
73 <object name="hostPlayerName" type="input" size="50%+10 40 100%-20 64" style="ModernInput">
75 this.caption = multiplayerName();
80 <!-- Host server name is only used on games started through the lobby. -->
81 <object name="hostServerNameWrapper" hidden="true">
82 <object type="text" size="20 36 50% 66" style="ModernRightLabelText">
83 <translatableAttribute id="caption">Server Name:</translatableAttribute>
86 <object name="hostServerName" type="input" size="50%+10 40 100%-20 64" style="ModernInput">
88 this.caption = getDefaultGameName();
94 <object type="text" size="20 66 50% 104" style="ModernRightLabelText">
95 <translatableAttribute id="caption">Server Port:</translatableAttribute>
98 <object name="hostPort" type="input" size="50%+10 80 100%-20 104" style="ModernInput">
99 <translatableAttribute id="tooltip">Leave blank to use the default port.</translatableAttribute>
101 this.caption = getValidPort(Engine.ConfigDB_GetValue("user", "multiplayerhosting.port"));
104 this.caption = getValidPort(this.caption);
109 <object name="hostSTUNWrapper" size="120 106 100% 146">
110 <object name="useSTUN" size="0 10 32 100%" type="checkbox" style="ModernTickBox">
111 <action on="Press">saveSettingAndWriteToUserConfig("lobby.stun.enabled", String(this.checked));</action>
113 <object type="text" size="26 0 100% 100%" style="ModernLeftLabelText">
114 <translatableAttribute id="caption">Use STUN to work around firewalls</translatableAttribute>
119 <object name="hostFeedback" type="text" style="ModernLabelText" size="50 100%-80 100%-50 100%-45" textcolor="red"/>
121 <object name="continueButton" hotkey="confirm" type="button" size="50%+5 100%-45 100%-18 100%-17" style="ModernButtonRed">
122 <translatableAttribute id="caption">Continue</translatableAttribute>
123 <action on="Press">confirmSetup();</action>
126 <object type="button" style="ModernButtonRed" size="18 100%-45 50%-5 100%-17" hotkey="cancel">
127 <translatableAttribute id="caption">Cancel</translatableAttribute>
128 <action on="Press">cancelSetup();</action>
131 <object name="pageConnecting" hidden="true">
132 <object name="connectionStatus" type="text" style="ModernLabelText" size="0 100 100% 120"/>