Always require lobby authentication for lobby matches, refs #3549 / rP21520 / D897.
[0ad.git] / binaries / data / mods / public / gui / gamesetup_mp / gamesetup_mp.xml
blobb37a17c56e421b53bbcf1792de7d7d95e7af4c96
1 <?xml version="1.0" encoding="utf-8"?>
3 <objects>
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">
13                 <action on="Tick">
14                         onTick();
15                 </action>
17                 <object style="ModernLabelText" type="text" size="50%-128 0%-16 50%+128 16">
18                         <translatableAttribute id="caption">Multiplayer</translatableAttribute>
19                 </object>
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>
25                         </object>
27                         <object type="text" size="20 36 50% 66" style="ModernRightLabelText">
28                                 <translatableAttribute id="caption">Player Name:</translatableAttribute>
29                         </object>
31                         <object name="joinPlayerName" type="input" size="50%+10 40 100%-20 64" style="ModernInput">
32                                 <action on="Load">
33                                         this.caption = multiplayerName();
34                                 </action>
35                         </object>
37                         <object type="text" size="20 76 50% 106" style="ModernRightLabelText">
38                                 <translatableAttribute id="caption">Server Hostname or IP:</translatableAttribute>
39                         </object>
41                         <object name="joinServer" type="input" size="50%+10 80 100%-20 104" style="ModernInput">
42                                 <action on="Load">
43                                         this.caption = Engine.ConfigDB_GetValue("user", "multiplayerserver");
44                                 </action>
45                         </object>
47                         <object type="text" size="20 116 50% 146" style="ModernRightLabelText">
48                                 <translatableAttribute id="caption">Server Port:</translatableAttribute>
49                         </object>
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>
53                                 <action on="Load">
54                                         this.caption = getValidPort(Engine.ConfigDB_GetValue("user", "multiplayerjoining.port"));
55                                 </action>
56                                 <action on="Press">
57                                         this.caption = getValidPort(this.caption);
58                                 </action>
59                         </object>
60                 </object>
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>
66                         </object>
68                         <object name="hostPlayerNameWrapper" hidden="true">
69                                 <object type="text" size="20 36 50% 66" style="ModernRightLabelText">
70                                         <translatableAttribute id="caption">Player Name:</translatableAttribute>
71                                 </object>
73                                 <object name="hostPlayerName" type="input" size="50%+10 40 100%-20 64" style="ModernInput">
74                                         <action on="Load">
75                                                 this.caption = multiplayerName();
76                                         </action>
77                                 </object>
78                         </object>
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>
84                                 </object>
86                                 <object name="hostServerName" type="input" size="50%+10 40 100%-20 64" style="ModernInput">
87                                         <action on="Load">
88                                                 this.caption = getDefaultGameName();
89                                         </action>
90                                 </object>
91                         </object>
93                         <object>
94                                 <object type="text" size="20 66 50% 104" style="ModernRightLabelText">
95                                         <translatableAttribute id="caption">Server Port:</translatableAttribute>
96                                 </object>
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>
100                                         <action on="Load">
101                                                 this.caption = getValidPort(Engine.ConfigDB_GetValue("user", "multiplayerhosting.port"));
102                                         </action>
103                                         <action on="Press">
104                                                 this.caption = getValidPort(this.caption);
105                                         </action>
106                                 </object>
107                         </object>
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>
112                                 </object>
113                                 <object type="text" size="26 0 100% 100%" style="ModernLeftLabelText">
114                                         <translatableAttribute id="caption">Use STUN to work around firewalls</translatableAttribute>
115                                 </object>
116                         </object>
117                 </object>
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>
124                 </object>
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>
129                 </object>
131                 <object name="pageConnecting" hidden="true">
132                         <object name="connectionStatus" type="text" style="ModernLabelText" size="0 100 100% 120"/>
133                 </object>
135         </object>
137 </objects>