forked from 0ad/0ad
121 lines
5.4 KiB
XML
121 lines
5.4 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
|
|
<objects>
|
|
<script file="gui/lobby/prelobby.js"/>
|
|
<script file="gui/common/functions_global_object.js"/>
|
|
<script file="gui/common/functions_utility.js"/>
|
|
|
|
<!-- Add a translucent black background to fade out the menu page -->
|
|
<object type="image" z="0" sprite="ModernFade"/>
|
|
|
|
<object name="dialog" type="image" style="ModernDialog" size="50%-190 50%-120 50%+190 50%+120">
|
|
|
|
<action on="Tick">
|
|
onTick();
|
|
</action>
|
|
|
|
<object style="ModernLabelText" type="text" size="50%-128 0%-16 50%+128 16">
|
|
<translatableAttribute id="caption">Multiplayer Lobby</translatableAttribute>
|
|
</object>
|
|
|
|
<object name="pageWelcome" size="0 32 100% 100%">
|
|
<object type="button" size="50 12 100%-50 68" style="ModernButtonRed">
|
|
<translatableAttribute id="caption">Create a new account</translatableAttribute>
|
|
<action on="Press">switchPage("register");</action>
|
|
</object>
|
|
<object type="button" size="50 80 100%-50 136" style="ModernButtonRed">
|
|
<translatableAttribute id="caption">Login to an existing account</translatableAttribute>
|
|
<action on="Press">switchPage("connect");</action>
|
|
</object>
|
|
</object>
|
|
<object name="pageConnect" size="0 32 100% 100%" hidden="true">
|
|
<object type="text" size="0 0 400 30" style="ModernLabelText" text_align="center">
|
|
<translatableAttribute id="caption">Connect to the game lobby</translatableAttribute>
|
|
</object>
|
|
<object name="connectUsernameLabel" type="text" size="50 40 125 70" style="ModernLabelText" text_align="right">
|
|
<translatableAttribute id="caption">Login:</translatableAttribute>
|
|
</object>
|
|
<object name="connectUsername" type="input" size="135 40 100%-50 64" style="ModernInput">
|
|
<action on="Load">
|
|
this.caption = Engine.ConfigDB_GetValue("user", "lobby.login");
|
|
</action>
|
|
</object>
|
|
<object name="connectPasswordLabel" type="text" size="50 80 125 110" style="ModernLabelText" text_align="right">
|
|
<translatableAttribute id="caption">Password:</translatableAttribute>
|
|
</object>
|
|
<object name="connectPassword" type="input" size="135 80 100%-50 104" style="ModernInput" mask="true" mask_char="*">
|
|
<action on="Load">
|
|
// We only show 10 characters to make it look decent.
|
|
this.caption = Engine.ConfigDB_GetValue("user", "lobby.password").substring(0, 10);
|
|
</action>
|
|
<action on="Press">
|
|
lobbyStartConnect();
|
|
</action>
|
|
</object>
|
|
</object>
|
|
<object name="pageRegister" size="0 32 100% 100%" hidden="true">
|
|
|
|
<object type="text" style="ModernLabelText" size="0 0 400 30" text_align="center">
|
|
<translatableAttribute id="caption">Registration</translatableAttribute>
|
|
</object>
|
|
|
|
<object name="registerUsernameLabel" type="text" size="50 40 130 70" style="ModernLabelText" text_align="right">
|
|
<translatableAttribute id="caption">Login:</translatableAttribute>
|
|
</object>
|
|
<object name="registerUsername" type="input" size="140 40 100%-50 64" style="ModernInput"/>
|
|
|
|
<object name="registerPasswordLabel" type="text" size="50 80 130 110" style="ModernLabelText" text_align="right">
|
|
<translatableAttribute id="caption">Password:</translatableAttribute>
|
|
</object>
|
|
<object name="registerPassword" type="input" size="140 80 100%-50 104" style="ModernInput" mask="true" mask_char="*"/>
|
|
|
|
<object name="registerPasswordAgainLabel" type="text" size="50 120 130 150" style="ModernLabelText" text_align="right">
|
|
<translatableAttribute id="caption">Password again:</translatableAttribute>
|
|
</object>
|
|
<object name="registerPasswordAgain" type="input" size="140 120 100%-50 144" style="ModernInput" mask="true" mask_char="*"/>
|
|
|
|
<object type="button" size="50 160 100%-50 188" style="ModernButtonRed">
|
|
<translatableAttribute id="caption">Terms of Service</translatableAttribute>
|
|
<action on="Press">openTermsOfService();</action>
|
|
</object>
|
|
|
|
<object type="button" size="50 200 100%-50 228" style="ModernButtonRed">
|
|
<translatableAttribute id="caption">Terms of Use</translatableAttribute>
|
|
<action on="Press">openTermsOfUse();</action>
|
|
</object>
|
|
|
|
<object name="registerAgreeTermsLabel" type="text" size="50 240 285 270" style="ModernLabelText">
|
|
<translatableAttribute id="caption">I have read and agree to the Terms of Service and Terms of Use:</translatableAttribute>
|
|
</object>
|
|
<object name="registerAgreeTerms" type="checkbox" size="295 245 100%-50 270" style="ModernTickBox" enabled="false">
|
|
<action on="Tick"><![CDATA[this.enabled = g_TermsOfServiceRead && g_TermsOfUseRead;]]></action>
|
|
</object>
|
|
|
|
</object>
|
|
<object name="feedback" type="text" size="50 100%-90 100%-50 100%-50" style="ModernLabelText" textcolor="red" text_align="center"/>
|
|
<object name="cancel" type="button" size="18 100%-45 50%-5 100%-17" style="ModernButtonRed">
|
|
<translatableAttribute id="caption">Cancel</translatableAttribute>
|
|
<action on="Press">
|
|
if (Engine.GetGUIObjectByName("pageWelcome").hidden)
|
|
switchPage("welcome");
|
|
else
|
|
{
|
|
lobbyStop();
|
|
Engine.PopGuiPage();
|
|
}
|
|
</action>
|
|
</object>
|
|
<object name="continue" type="button" size="50%+5 100%-45 100%-18 100%-17" style="ModernButtonRed" enabled="false" hidden="true">
|
|
<translatableAttribute id="caption">Connect</translatableAttribute>
|
|
<action on="Press">
|
|
if (!Engine.GetGUIObjectByName("pageConnect").hidden)
|
|
lobbyStartConnect();
|
|
else if (!Engine.GetGUIObjectByName("pageRegister").hidden)
|
|
lobbyStartRegister();
|
|
</action>
|
|
</object>
|
|
|
|
</object>
|
|
|
|
</objects>
|