1
0
forked from 0ad/0ad

Actually stop connecting to the lobby if the user cancelled the login.

Fixes #4438
Patch By: sbirmi
This was SVN commit r19469.
This commit is contained in:
elexis 2017-04-29 00:03:41 +00:00
parent 41d4649c6d
commit 2d999a746e
2 changed files with 10 additions and 9 deletions

View File

@ -260,3 +260,12 @@ function openTermsOfUse()
});
}
function prelobbyCancel()
{
lobbyStop();
if (Engine.GetGUIObjectByName("pageWelcome").hidden)
switchPage("welcome");
else
Engine.PopGuiPage();
}

View File

@ -95,15 +95,7 @@
<object name="feedback" type="text" size="50 100%-110 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" hotkey="cancel">
<translatableAttribute id="caption">Cancel</translatableAttribute>
<action on="Press">
if (Engine.GetGUIObjectByName("pageWelcome").hidden)
switchPage("welcome");
else
{
lobbyStop();
Engine.PopGuiPage();
}
</action>
<action on="Press">prelobbyCancel();</action>
</object>
<object name="continue" hotkey="confirm" type="button" size="50%+5 100%-45 100%-18 100%-17" style="ModernButtonRed" enabled="false" hidden="true">
<translatableAttribute id="caption">Connect</translatableAttribute>