Changeset View
Changeset View
Standalone View
Standalone View
ps/trunk/binaries/data/mods/public/gui/prelobby/login/login.js
function init() | function init() | ||||
{ | { | ||||
g_LobbyMessages.connected = onLogin; | g_LobbyMessages.connected = onLogin; | ||||
Engine.GetGUIObjectByName("continue").caption = translate("Connect"); | Engine.GetGUIObjectByName("continue").caption = translate("Connect"); | ||||
// Shorten the displayed password for visual reasons only | // Shorten the displayed password for visual reasons only | ||||
Engine.GetGUIObjectByName("username").caption = Engine.ConfigDB_GetValue("user", "lobby.login"); | Engine.GetGUIObjectByName("username").caption = Engine.ConfigDB_GetValue("user", "lobby.login"); | ||||
Engine.GetGUIObjectByName("password").caption = Engine.ConfigDB_GetValue("user", "lobby.password").substr(0, 10); | Engine.GetGUIObjectByName("password").caption = Engine.ConfigDB_GetValue("user", "lobby.password").substr(0, 10); | ||||
loadTermsAcceptance(); | initLobbyTerms(); | ||||
initRememberPassword(); | initRememberPassword(); | ||||
updateFeedback(); | updateFeedback(); | ||||
} | } | ||||
function updateFeedback() | function updateFeedback() | ||||
{ | { | ||||
setFeedback(checkUsername(false) || checkPassword(false) || checkTerms()); | setFeedback(checkUsername(false) || checkPassword(false) || checkTerms()); | ||||
Show All 18 Lines | Engine.StartXmppClient( | ||||
+Engine.ConfigDB_GetValue("user", "lobby.history")); | +Engine.ConfigDB_GetValue("user", "lobby.history")); | ||||
Engine.ConnectXmppClient(); | Engine.ConnectXmppClient(); | ||||
} | } | ||||
function onLogin(message) | function onLogin(message) | ||||
{ | { | ||||
saveCredentials(); | saveCredentials(); | ||||
saveTermsAcceptance(); | |||||
Engine.SwitchGuiPage("page_lobby.xml", { | Engine.SwitchGuiPage("page_lobby.xml", { | ||||
"dialog": false | "dialog": false | ||||
}); | }); | ||||
} | } |
Wildfire Games · Phabricator