Use new AGRP prefix on console msg
This commit is contained in:
@@ -21,7 +21,7 @@ let twoFactorAuth = {
|
||||
// ===========================================================================
|
||||
|
||||
function initTwoFactorAuthenticationGUI() {
|
||||
logToConsole(LOG_DEBUG, `[VRR.GUI] Creating two factor auth GUI ...`);
|
||||
logToConsole(LOG_DEBUG, `[AGRP.GUI] Creating two factor auth GUI ...`);
|
||||
twoFactorAuth.window = mexui.window(game.width / 2 - 150, game.height / 2 - 129, 300, 258, 'LOGIN', {
|
||||
main: {
|
||||
backgroundColour: toColour(secondaryColour[0], secondaryColour[1], secondaryColour[2], windowAlpha),
|
||||
@@ -95,14 +95,14 @@ function initTwoFactorAuthenticationGUI() {
|
||||
},
|
||||
}, checkTwoFactorAuth);
|
||||
|
||||
logToConsole(LOG_DEBUG, `[VRR.GUI] Created two factor auth GUI`);
|
||||
logToConsole(LOG_DEBUG, `[AGRP.GUI] Created two factor auth GUI`);
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
|
||||
function showTwoFactorAuthGUI() {
|
||||
closeAllWindows();
|
||||
logToConsole(LOG_DEBUG, `[VRR.GUI] Showing two-factor authentication window`);
|
||||
logToConsole(LOG_DEBUG, `[AGRP.GUI] Showing two-factor authentication window`);
|
||||
setChatWindowEnabled(false);
|
||||
mexui.setInput(true);
|
||||
twoFactorAuth.window.shown = true;
|
||||
@@ -113,7 +113,7 @@ function showTwoFactorAuthGUI() {
|
||||
// ===========================================================================
|
||||
|
||||
function twoFactorAuthFailed(errorMessage) {
|
||||
logToConsole(LOG_DEBUG, `[VRR.GUI] Server reports two-factor authentication failed. Reason: ${errorMessage}`);
|
||||
logToConsole(LOG_DEBUG, `[AGRP.GUI] Server reports two-factor authentication failed. Reason: ${errorMessage}`);
|
||||
twoFactorAuth.messageLabel.text = errorMessage;
|
||||
twoFactorAuth.messageLabel.styles.main.textColour = toColour(180, 32, 32, 255);
|
||||
twoFactorAuth.codeInput.text = "";
|
||||
@@ -122,14 +122,14 @@ function twoFactorAuthFailed(errorMessage) {
|
||||
// ===========================================================================
|
||||
|
||||
function twoFactorAuthSuccess() {
|
||||
logToConsole(LOG_DEBUG, `[VRR.GUI] Server reports two-factor authentication was successful`);
|
||||
logToConsole(LOG_DEBUG, `[AGRP.GUI] Server reports two-factor authentication was successful`);
|
||||
closeAllWindows();
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
|
||||
function checkTwoFactorAuth() {
|
||||
logToConsole(LOG_DEBUG, `[VRR.GUI] Checking two-factor authentication with server ...`);
|
||||
logToConsole(LOG_DEBUG, `[AGRP.GUI] Checking two-factor authentication with server ...`);
|
||||
sendNetworkEventToServer("agrp.2fa", twoFactorAuth.codeInput.lines[0]);
|
||||
}
|
||||
|
||||
|
||||
@@ -20,7 +20,7 @@ let passwordChange = {
|
||||
// ===========================================================================
|
||||
|
||||
function initChangePasswordGUI() {
|
||||
logToConsole(LOG_DEBUG, `[VRR.GUI] Creating password change GUI ...`);
|
||||
logToConsole(LOG_DEBUG, `[AGRP.GUI] Creating password change GUI ...`);
|
||||
passwordChange.window = mexui.window(game.width / 2 - 130, game.height / 2 - 125, 300, 250, 'Change Password', {
|
||||
main: {
|
||||
backgroundColour: toColour(secondaryColour[0], secondaryColour[1], secondaryColour[2], windowAlpha),
|
||||
@@ -111,13 +111,13 @@ function initChangePasswordGUI() {
|
||||
borderColour: toColour(primaryColour[0], primaryColour[1], primaryColour[2], buttonAlpha),
|
||||
},
|
||||
}, checkChangePassword);
|
||||
logToConsole(LOG_DEBUG, `[VRR.GUI] Created change password GUI`);
|
||||
logToConsole(LOG_DEBUG, `[AGRP.GUI] Created change password GUI`);
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
|
||||
function passwordChangeFailed(errorMessage) {
|
||||
logToConsole(LOG_DEBUG, `[VRR.GUI] Server reports change password failed. Reason: ${errorMessage}`);
|
||||
logToConsole(LOG_DEBUG, `[AGRP.GUI] Server reports change password failed. Reason: ${errorMessage}`);
|
||||
passwordChange.messageLabel.text = errorMessage;
|
||||
passwordChange.messageLabel.styles.main.textColour = toColour(180, 32, 32, 255);
|
||||
passwordChange.passwordInput.text = "";
|
||||
@@ -128,14 +128,14 @@ function passwordChangeFailed(errorMessage) {
|
||||
// ===========================================================================
|
||||
|
||||
function checkChangePassword() {
|
||||
logToConsole(LOG_DEBUG, `[VRR.GUI] Checking password change with server ...`);
|
||||
logToConsole(LOG_DEBUG, `[AGRP.GUI] Checking password change with server ...`);
|
||||
sendNetworkEventToServer("agrp.checkChangePassword", passwordChange.passwordInput.lines[0], passwordChange.confirmPasswordInput.lines[0]);
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
|
||||
function showChangePasswordGUI(errorMessage) {
|
||||
logToConsole(LOG_DEBUG, `[VRR.GUI] Showing change password window`);
|
||||
logToConsole(LOG_DEBUG, `[AGRP.GUI] Showing change password window`);
|
||||
closeAllWindows();
|
||||
setChatWindowEnabled(false);
|
||||
mexui.setInput(true);
|
||||
@@ -150,7 +150,7 @@ function showChangePasswordGUI(errorMessage) {
|
||||
// ===========================================================================
|
||||
|
||||
function passwordChangeSuccess() {
|
||||
logToConsole(LOG_DEBUG, `[VRR.GUI] Server reports password change was successful`);
|
||||
logToConsole(LOG_DEBUG, `[AGRP.GUI] Server reports password change was successful`);
|
||||
guiSubmitKey = false;
|
||||
closeAllWindows();
|
||||
}
|
||||
|
||||
@@ -24,7 +24,7 @@ let characterSelect = {
|
||||
// ===========================================================================
|
||||
|
||||
function initCharacterSelectGUI() {
|
||||
logToConsole(LOG_DEBUG, `[VRR.GUI] Creating character select GUI ...`);
|
||||
logToConsole(LOG_DEBUG, `[AGRP.GUI] Creating character select GUI ...`);
|
||||
characterSelect.window = mexui.window(game.width / 2 - 215, game.height / 2 - 83, 430, 190, 'SELECT CHARACTER', {
|
||||
main: {
|
||||
backgroundColour: toColour(secondaryColour[0], secondaryColour[1], secondaryColour[2], windowAlpha),
|
||||
@@ -151,14 +151,14 @@ function initCharacterSelectGUI() {
|
||||
borderColour: toColour(0, 0, 0, 0),
|
||||
}
|
||||
});
|
||||
logToConsole(LOG_DEBUG, `[VRR.GUI] Created character select GUI`);
|
||||
logToConsole(LOG_DEBUG, `[AGRP.GUI] Created character select GUI`);
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
|
||||
function showCharacterSelectGUI(firstName, lastName, cash, clan, lastPlayed, skinId) {
|
||||
closeAllWindows();
|
||||
logToConsole(LOG_DEBUG, `[VRR.GUI] Showing character selection window`);
|
||||
logToConsole(LOG_DEBUG, `[AGRP.GUI] Showing character selection window`);
|
||||
setChatWindowEnabled(false);
|
||||
mexui.setInput(true);
|
||||
characterSelect.nameText.text = `${firstName} ${lastName}`;
|
||||
@@ -179,35 +179,35 @@ function showCharacterSelectGUI(firstName, lastName, cash, clan, lastPlayed, ski
|
||||
|
||||
function showNewCharacter() {
|
||||
closeAllWindows();
|
||||
logToConsole(LOG_DEBUG, `[VRR.GUI] Showing new character dialog window`);
|
||||
logToConsole(LOG_DEBUG, `[AGRP.GUI] Showing new character dialog window`);
|
||||
showNewCharacterGUI();
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
|
||||
function selectNextCharacter() {
|
||||
logToConsole(LOG_DEBUG, `[VRR.GUI] Requesting next character info from server for character select window`);
|
||||
logToConsole(LOG_DEBUG, `[AGRP.GUI] Requesting next character info from server for character select window`);
|
||||
sendNetworkEventToServer("agrp.nextCharacter");
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
|
||||
function selectPreviousCharacter() {
|
||||
logToConsole(LOG_DEBUG, `[VRR.GUI] Requesting previous character info from server for character select window`);
|
||||
logToConsole(LOG_DEBUG, `[AGRP.GUI] Requesting previous character info from server for character select window`);
|
||||
sendNetworkEventToServer("agrp.previousCharacter");
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
|
||||
function selectThisCharacter() {
|
||||
logToConsole(LOG_DEBUG, `[VRR.GUI] Tell server the current shown character was selected in character select window`);
|
||||
logToConsole(LOG_DEBUG, `[AGRP.GUI] Tell server the current shown character was selected in character select window`);
|
||||
sendNetworkEventToServer("agrp.selectCharacter");
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
|
||||
function switchCharacterSelectGUI(firstName, lastName, cash, clan, lastPlayed, skinId) {
|
||||
logToConsole(LOG_DEBUG, `[VRR.GUI] Updating character info with data from server`);
|
||||
logToConsole(LOG_DEBUG, `[AGRP.GUI] Updating character info with data from server`);
|
||||
setChatWindowEnabled(false);
|
||||
characterSelect.window.shown = false;
|
||||
characterSelect.nameText.text = `${firstName} ${lastName}`;
|
||||
@@ -230,7 +230,7 @@ function switchCharacterSelectGUI(firstName, lastName, cash, clan, lastPlayed, s
|
||||
// ===========================================================================
|
||||
|
||||
function characterSelectSuccess() {
|
||||
logToConsole(LOG_DEBUG, `[VRR.GUI] Server reports character selection was successful`);
|
||||
logToConsole(LOG_DEBUG, `[AGRP.GUI] Server reports character selection was successful`);
|
||||
closeAllWindows();
|
||||
}
|
||||
|
||||
|
||||
@@ -17,7 +17,7 @@ let errorDialog = {
|
||||
// ===========================================================================
|
||||
|
||||
function initErrorDialogGUI() {
|
||||
logToConsole(LOG_DEBUG, `[VRR.GUI] Creating error GUI ...`);
|
||||
logToConsole(LOG_DEBUG, `[AGRP.GUI] Creating error GUI ...`);
|
||||
errorDialog.window = mexui.window(getScreenWidth() / 2 - 200, getScreenHeight() / 2 - 70, 400, 140, 'ERROR', {
|
||||
main: {
|
||||
backgroundColour: toColour(secondaryColour[0], secondaryColour[1], secondaryColour[2], windowAlpha),
|
||||
@@ -59,14 +59,14 @@ function initErrorDialogGUI() {
|
||||
borderColour: toColour(primaryColour[0], primaryColour[1], primaryColour[2], 255),
|
||||
},
|
||||
}, closeErrorDialog);
|
||||
logToConsole(LOG_DEBUG, `[VRR.GUI] Created error GUI ...`);
|
||||
logToConsole(LOG_DEBUG, `[AGRP.GUI] Created error GUI ...`);
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
|
||||
function showErrorGUI(errorMessage, errorTitle, buttonText) {
|
||||
closeAllWindows();
|
||||
logToConsole(LOG_DEBUG, `[VRR.GUI] Showing error window. Error: ${errorTitle} - ${errorMessage}`);
|
||||
logToConsole(LOG_DEBUG, `[AGRP.GUI] Showing error window. Error: ${errorTitle} - ${errorMessage}`);
|
||||
setChatWindowEnabled(false);
|
||||
mexui.setInput(true);
|
||||
errorDialog.messageLabel.text = errorMessage;
|
||||
@@ -78,7 +78,7 @@ function showErrorGUI(errorMessage, errorTitle, buttonText) {
|
||||
// ===========================================================================
|
||||
|
||||
function closeErrorDialog() {
|
||||
logToConsole(LOG_DEBUG, `[VRR.GUI] Closing error dialog`);
|
||||
logToConsole(LOG_DEBUG, `[AGRP.GUI] Closing error dialog`);
|
||||
errorDialog.window.shown = false;
|
||||
mexui.setInput(false);
|
||||
}
|
||||
|
||||
@@ -23,7 +23,7 @@ let dealerCards = [];
|
||||
|
||||
function initBlackJackGUI() {
|
||||
// Render a blackjack game in MexUI
|
||||
//logToConsole(LOG_DEBUG, `[VRR.GUI] Creating blackjack GUI ...`);
|
||||
//logToConsole(LOG_DEBUG, `[AGRP.GUI] Creating blackjack GUI ...`);
|
||||
blackJackGUI.window = mexui.window(game.width / 2 - 200, game.height - 150, 400, 400, 'Blackjack', {
|
||||
main: {
|
||||
backgroundColour: toColour(secondaryColour[0], secondaryColour[1], secondaryColour[2], 0),
|
||||
@@ -43,7 +43,7 @@ function initBlackJackGUI() {
|
||||
|
||||
blackJackGUI.window.shown = false;
|
||||
|
||||
//logToConsole(LOG_DEBUG, `[VRR.GUI] Created blackjack GUI`);
|
||||
//logToConsole(LOG_DEBUG, `[AGRP.GUI] Created blackjack GUI`);
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
@@ -17,7 +17,7 @@ let infoDialog = {
|
||||
// ===========================================================================
|
||||
|
||||
function initInfoDialogGUI() {
|
||||
logToConsole(LOG_DEBUG, `[VRR.GUI] Creating info dialog GUI ...`);
|
||||
logToConsole(LOG_DEBUG, `[AGRP.GUI] Creating info dialog GUI ...`);
|
||||
infoDialog.window = mexui.window(getScreenWidth() / 2 - 200, getScreenHeight() / 2 - 70, 400, 140, 'Information', {
|
||||
main: {
|
||||
backgroundColour: toColour(secondaryColour[0], secondaryColour[1], secondaryColour[2], windowAlpha),
|
||||
@@ -58,13 +58,13 @@ function initInfoDialogGUI() {
|
||||
borderColour: toColour(primaryColour[0], primaryColour[1], primaryColour[2], 255),
|
||||
},
|
||||
}, closeInfoDialog);
|
||||
logToConsole(LOG_DEBUG, `[VRR.GUI] Created info dialog GUI`);
|
||||
logToConsole(LOG_DEBUG, `[AGRP.GUI] Created info dialog GUI`);
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
|
||||
function closeInfoDialog() {
|
||||
logToConsole(LOG_DEBUG, `[VRR.GUI] Closing info dialog`);
|
||||
logToConsole(LOG_DEBUG, `[AGRP.GUI] Closing info dialog`);
|
||||
infoDialog.window.shown = false;
|
||||
mexui.setInput(false);
|
||||
}
|
||||
@@ -73,7 +73,7 @@ function closeInfoDialog() {
|
||||
|
||||
function showInfoGUI(infoMessage, infoTitle, buttonText) {
|
||||
closeAllWindows();
|
||||
logToConsole(LOG_DEBUG, `[VRR.GUI] Showing info dialog window. Info: ${infoTitle} - ${infoMessage}`);
|
||||
logToConsole(LOG_DEBUG, `[AGRP.GUI] Showing info dialog window. Info: ${infoTitle} - ${infoMessage}`);
|
||||
mexui.setInput(true);
|
||||
infoDialog.messageLabel.text = infoMessage;
|
||||
infoDialog.okayButton.text = buttonText;
|
||||
|
||||
@@ -17,7 +17,7 @@ let listDialog = {
|
||||
// ===========================================================================
|
||||
|
||||
function initListGUI() {
|
||||
logToConsole(LOG_DEBUG, `[VRR.GUI] Creating list dialog GUI ...`);
|
||||
logToConsole(LOG_DEBUG, `[AGRP.GUI] Creating list dialog GUI ...`);
|
||||
listDialog.window = mexui.window(game.width / 2 - 200, game.height / 2 - 70, 400, 500, 'List', {
|
||||
main: {
|
||||
backgroundColour: toColour(secondaryColour[0], secondaryColour[1], secondaryColour[2], windowAlpha),
|
||||
@@ -71,14 +71,14 @@ function initListGUI() {
|
||||
}
|
||||
}
|
||||
});
|
||||
logToConsole(LOG_DEBUG, `[VRR.GUI] Created list dialog GUI`);
|
||||
logToConsole(LOG_DEBUG, `[AGRP.GUI] Created list dialog GUI`);
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
|
||||
function showListGUI() {
|
||||
closeAllWindows();
|
||||
logToConsole(LOG_DEBUG, `[VRR.GUI] Showing login window`);
|
||||
logToConsole(LOG_DEBUG, `[AGRP.GUI] Showing login window`);
|
||||
setChatWindowEnabled(false);
|
||||
mexui.setInput(true);
|
||||
listDialog.window.shown = true;
|
||||
|
||||
@@ -20,7 +20,7 @@ let flagImageGap = toVector2(5, 5);
|
||||
// ===========================================================================
|
||||
|
||||
function initLocaleChooserGUI() {
|
||||
logToConsole(LOG_DEBUG, `[VRR.GUI] Creating locale chooser GUI ...`);
|
||||
logToConsole(LOG_DEBUG, `[AGRP.GUI] Creating locale chooser GUI ...`);
|
||||
localeChooser.window = mexui.window(game.width / 2 - 200, game.height - 150, 60, 60, 'Choose a language', {
|
||||
main: {
|
||||
backgroundColour: toColour(secondaryColour[0], secondaryColour[1], secondaryColour[2], 0),
|
||||
@@ -42,13 +42,13 @@ function initLocaleChooserGUI() {
|
||||
|
||||
loadLocaleConfig();
|
||||
|
||||
logToConsole(LOG_DEBUG, `[VRR.GUI] Created locale chooser GUI`);
|
||||
logToConsole(LOG_DEBUG, `[AGRP.GUI] Created locale chooser GUI`);
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
|
||||
function closeLocaleChooserGUI() {
|
||||
logToConsole(LOG_DEBUG, `[VRR.GUI] Closing locale chooser window`);
|
||||
logToConsole(LOG_DEBUG, `[AGRP.GUI] Closing locale chooser window`);
|
||||
localeChooser.window.shown = false;
|
||||
for (let i in localeChooser.flagImages) {
|
||||
localeChooser.flagImages[i].shown = false;
|
||||
@@ -69,7 +69,7 @@ function showLocaleChooserGUI(position = toVector2(0.0, 0.0)) {
|
||||
}
|
||||
|
||||
//closeAllWindows();
|
||||
logToConsole(LOG_DEBUG, `[VRR.GUI] Showing locale chooser window`);
|
||||
logToConsole(LOG_DEBUG, `[AGRP.GUI] Showing locale chooser window`);
|
||||
mexui.setInput(true);
|
||||
localeChooser.window.shown = true;
|
||||
|
||||
@@ -91,14 +91,14 @@ function toggleLocaleChooserGUI() {
|
||||
// ===========================================================================
|
||||
|
||||
function localeChooserSetLocale(localeId) {
|
||||
logToConsole(LOG_DEBUG | LOG_WARN, `[VRR.GUI] Asking server to change locale to ${localeId}`);
|
||||
logToConsole(LOG_DEBUG | LOG_WARN, `[AGRP.GUI] Asking server to change locale to ${localeId}`);
|
||||
sendLocaleSelectToServer(localeId);
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
|
||||
function resetLocaleChooserOptions() {
|
||||
logToConsole(LOG_DEBUG | LOG_WARN, `[VRR.GUI] Resetting locale chooser options`);
|
||||
logToConsole(LOG_DEBUG | LOG_WARN, `[AGRP.GUI] Resetting locale chooser options`);
|
||||
|
||||
// let tempLocaleOptions = getServerData().localeOptions; // getAvailableLocaleOptions();
|
||||
let tempLocaleOptions = getAvailableLocaleOptions();
|
||||
@@ -122,7 +122,7 @@ function resetLocaleChooserOptions() {
|
||||
|
||||
localeChooser.flagImages[i].shown = false;
|
||||
|
||||
logToConsole(LOG_DEBUG | LOG_WARN, `[VRR.GUI] Created locale chooser option ${tempLocaleOptions[i].englishName} with image ${imagePath}`);
|
||||
logToConsole(LOG_DEBUG | LOG_WARN, `[AGRP.GUI] Created locale chooser option ${tempLocaleOptions[i].englishName} with image ${imagePath}`);
|
||||
|
||||
//localeChooser.activeRingImages.push(activeRingImage);
|
||||
}
|
||||
|
||||
@@ -43,7 +43,7 @@ let loginHTML =
|
||||
// ===========================================================================
|
||||
|
||||
function initLoginGUI() {
|
||||
logToConsole(LOG_DEBUG, `[VRR.GUI] Creating login GUI ...`);
|
||||
logToConsole(LOG_DEBUG, `[AGRP.GUI] Creating login GUI ...`);
|
||||
login.window = mexui.window(getScreenWidth() / 2 - 150, getScreenHeight() / 2 - 135, 300, 275, 'LOGIN', {
|
||||
main: {
|
||||
backgroundColour: toColour(secondaryColour[0], secondaryColour[1], secondaryColour[2], windowAlpha),
|
||||
@@ -144,14 +144,14 @@ function initLoginGUI() {
|
||||
},
|
||||
});
|
||||
|
||||
logToConsole(LOG_DEBUG, `[VRR.GUI] Created login GUI`);
|
||||
logToConsole(LOG_DEBUG, `[AGRP.GUI] Created login GUI`);
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
|
||||
function showLoginGUI() {
|
||||
closeAllWindows();
|
||||
logToConsole(LOG_DEBUG, `[VRR.GUI] Showing login window`);
|
||||
logToConsole(LOG_DEBUG, `[AGRP.GUI] Showing login window`);
|
||||
setChatWindowEnabled(false);
|
||||
mexui.setInput(true);
|
||||
login.window.shown = true;
|
||||
@@ -165,14 +165,14 @@ function showLoginGUI() {
|
||||
// ===========================================================================
|
||||
|
||||
function checkLogin() {
|
||||
logToConsole(LOG_DEBUG, `[VRR.GUI] Checking login with server ...`);
|
||||
logToConsole(LOG_DEBUG, `[AGRP.GUI] Checking login with server ...`);
|
||||
sendNetworkEventToServer("agrp.checkLogin", login.passwordInput.lines[0]);
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
|
||||
function loginFailed(errorMessage) {
|
||||
logToConsole(LOG_DEBUG, `[VRR.GUI] Server reports login failed`);
|
||||
logToConsole(LOG_DEBUG, `[AGRP.GUI] Server reports login failed`);
|
||||
login.messageLabel.text = errorMessage;
|
||||
login.messageLabel.styles.main.textColour = toColour(180, 32, 32, 255);
|
||||
login.passwordInput.text = "";
|
||||
@@ -181,7 +181,7 @@ function loginFailed(errorMessage) {
|
||||
// ===========================================================================
|
||||
|
||||
function loginSuccess() {
|
||||
logToConsole(LOG_DEBUG, `[VRR.GUI] Server reports login was successful`);
|
||||
logToConsole(LOG_DEBUG, `[AGRP.GUI] Server reports login was successful`);
|
||||
guiSubmitKey = false;
|
||||
closeAllWindows();
|
||||
}
|
||||
@@ -190,7 +190,7 @@ function loginSuccess() {
|
||||
|
||||
function switchToPasswordResetGUI() {
|
||||
//closeAllWindows();
|
||||
//logToConsole(LOG_DEBUG, `[VRR.GUI] Showing password reset dialog window`);
|
||||
//logToConsole(LOG_DEBUG, `[AGRP.GUI] Showing password reset dialog window`);
|
||||
//showResetPasswordGUI();
|
||||
sendNetworkEventToServer("agrp.checkResetPassword", "");
|
||||
return false;
|
||||
|
||||
@@ -20,7 +20,7 @@ let newCharacter = {
|
||||
// ===========================================================================
|
||||
|
||||
function initNewCharacterGUI() {
|
||||
logToConsole(LOG_DEBUG, `[VRR.GUI] Creating new character GUI ...`);
|
||||
logToConsole(LOG_DEBUG, `[AGRP.GUI] Creating new character GUI ...`);
|
||||
newCharacter.window = mexui.window(getScreenWidth() / 2 - 130, getScreenHeight() / 2 - 115, 300, 230, 'NEW CHARACTER', {
|
||||
main: {
|
||||
backgroundColour: toColour(secondaryColour[0], secondaryColour[1], secondaryColour[2], windowAlpha),
|
||||
@@ -111,13 +111,13 @@ function initNewCharacterGUI() {
|
||||
borderColour: toColour(primaryColour[0], primaryColour[1], primaryColour[2], buttonAlpha),
|
||||
},
|
||||
}, checkNewCharacter);
|
||||
logToConsole(LOG_DEBUG, `[VRR.GUI] Created new character GUI`);
|
||||
logToConsole(LOG_DEBUG, `[AGRP.GUI] Created new character GUI`);
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
|
||||
function newCharacterFailed(errorMessage) {
|
||||
logToConsole(LOG_DEBUG, `[VRR.GUI] Server reports new character creation failed. Reason: ${errorMessage}`);
|
||||
logToConsole(LOG_DEBUG, `[AGRP.GUI] Server reports new character creation failed. Reason: ${errorMessage}`);
|
||||
newCharacter.messageLabel.text = errorMessage;
|
||||
newCharacter.messageLabel.styles.main.textColour = toColour(180, 32, 32, 255);
|
||||
newCharacter.firstNameInput.text = "";
|
||||
@@ -135,7 +135,7 @@ function newCharacterFailed(errorMessage) {
|
||||
// ===========================================================================
|
||||
|
||||
function checkNewCharacter() {
|
||||
logToConsole(LOG_DEBUG, `[VRR.GUI] Checking new character with server ...`);
|
||||
logToConsole(LOG_DEBUG, `[AGRP.GUI] Checking new character with server ...`);
|
||||
if (newCharacter.firstNameInput.lines[0].length < 2) {
|
||||
return false;
|
||||
}
|
||||
@@ -153,7 +153,7 @@ function checkNewCharacter() {
|
||||
// ===========================================================================
|
||||
|
||||
function showNewCharacterGUI() {
|
||||
logToConsole(LOG_DEBUG, `[VRR.GUI] Showing new character window`);
|
||||
logToConsole(LOG_DEBUG, `[AGRP.GUI] Showing new character window`);
|
||||
closeAllWindows();
|
||||
setChatWindowEnabled(false);
|
||||
mexui.setInput(true);
|
||||
|
||||
@@ -21,7 +21,7 @@ let register = {
|
||||
// ===========================================================================
|
||||
|
||||
function initRegisterGUI() {
|
||||
logToConsole(LOG_DEBUG, `[VRR.GUI] Creating register GUI ...`);
|
||||
logToConsole(LOG_DEBUG, `[AGRP.GUI] Creating register GUI ...`);
|
||||
register.window = mexui.window(getScreenWidth() / 2 - 150, getScreenHeight() / 2 - 150, 300, 300, 'Register', {
|
||||
main: {
|
||||
backgroundColour: toColour(secondaryColour[0], secondaryColour[1], secondaryColour[2], windowAlpha),
|
||||
@@ -131,13 +131,13 @@ function initRegisterGUI() {
|
||||
borderColour: toColour(primaryColour[0], primaryColour[1], primaryColour[2], buttonAlpha),
|
||||
},
|
||||
}, checkRegistration);
|
||||
logToConsole(LOG_DEBUG, `[VRR.GUI] Created register GUI`);
|
||||
logToConsole(LOG_DEBUG, `[AGRP.GUI] Created register GUI`);
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
|
||||
function registrationFailed(errorMessage) {
|
||||
logToConsole(LOG_DEBUG, `[VRR.GUI] Server reports registration failed. Reason: ${errorMessage}`);
|
||||
logToConsole(LOG_DEBUG, `[AGRP.GUI] Server reports registration failed. Reason: ${errorMessage}`);
|
||||
register.messageLabel.text = errorMessage;
|
||||
register.messageLabel.styles.main.textColour = toColour(180, 32, 32, 255);
|
||||
register.passwordInput.text = "";
|
||||
@@ -148,14 +148,14 @@ function registrationFailed(errorMessage) {
|
||||
// ===========================================================================
|
||||
|
||||
function checkRegistration() {
|
||||
logToConsole(LOG_DEBUG, `[VRR.GUI] Checking registration with server ...`);
|
||||
logToConsole(LOG_DEBUG, `[AGRP.GUI] Checking registration with server ...`);
|
||||
sendNetworkEventToServer("agrp.checkRegistration", register.passwordInput.lines[0], register.confirmPasswordInput.lines[0], register.emailInput.lines[0]);
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
|
||||
function showRegistrationGUI() {
|
||||
logToConsole(LOG_DEBUG, `[VRR.GUI] Showing registration window`);
|
||||
logToConsole(LOG_DEBUG, `[AGRP.GUI] Showing registration window`);
|
||||
closeAllWindows();
|
||||
setChatWindowEnabled(false);
|
||||
mexui.setInput(true);
|
||||
@@ -171,7 +171,7 @@ function showRegistrationGUI() {
|
||||
// ===========================================================================
|
||||
|
||||
function registrationSuccess() {
|
||||
logToConsole(LOG_DEBUG, `[VRR.GUI] Server reports registration was successful`);
|
||||
logToConsole(LOG_DEBUG, `[AGRP.GUI] Server reports registration was successful`);
|
||||
guiSubmitKey = false;
|
||||
closeAllWindows();
|
||||
}
|
||||
|
||||
@@ -21,7 +21,7 @@ let passwordReset = {
|
||||
// ===========================================================================
|
||||
|
||||
function initResetPasswordGUI() {
|
||||
logToConsole(LOG_DEBUG, `[VRR.GUI] Creating password reset GUI ...`);
|
||||
logToConsole(LOG_DEBUG, `[AGRP.GUI] Creating password reset GUI ...`);
|
||||
passwordReset.window = mexui.window(getScreenWidth() / 2 - 150, getScreenHeight() / 2 - 135, 300, 275, 'RESET PASSWORD', {
|
||||
main: {
|
||||
backgroundColour: toColour(secondaryColour[0], secondaryColour[1], secondaryColour[2], windowAlpha),
|
||||
@@ -121,14 +121,14 @@ function initResetPasswordGUI() {
|
||||
},
|
||||
});
|
||||
|
||||
logToConsole(LOG_DEBUG, `[VRR.GUI] Created password reset GUI`);
|
||||
logToConsole(LOG_DEBUG, `[AGRP.GUI] Created password reset GUI`);
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
|
||||
function showResetPasswordGUI() {
|
||||
closeAllWindows();
|
||||
logToConsole(LOG_DEBUG, `[VRR.GUI] Showing password reset window`);
|
||||
logToConsole(LOG_DEBUG, `[AGRP.GUI] Showing password reset window`);
|
||||
setChatWindowEnabled(false);
|
||||
mexui.setInput(true);
|
||||
passwordReset.window.shown = true;
|
||||
@@ -142,14 +142,14 @@ function showResetPasswordGUI() {
|
||||
// ===========================================================================
|
||||
|
||||
function checkResetPassword() {
|
||||
logToConsole(LOG_DEBUG, `[VRR.GUI] Checking password reset with server (${passwordReset.emailInput.lines[0]}) ...`);
|
||||
logToConsole(LOG_DEBUG, `[AGRP.GUI] Checking password reset with server (${passwordReset.emailInput.lines[0]}) ...`);
|
||||
sendNetworkEventToServer("agrp.checkResetPassword", passwordReset.emailInput.lines[0]);
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
|
||||
function resetPasswordFailed(errorMessage) {
|
||||
logToConsole(LOG_DEBUG, `[VRR.GUI] Server reports password reset failed`);
|
||||
logToConsole(LOG_DEBUG, `[AGRP.GUI] Server reports password reset failed`);
|
||||
passwordReset.messageLabel.text = errorMessage;
|
||||
passwordReset.messageLabel.styles.main.textColour = toColour(180, 32, 32, 255);
|
||||
passwordReset.emailInput.text = "";
|
||||
@@ -158,7 +158,7 @@ function resetPasswordFailed(errorMessage) {
|
||||
// ===========================================================================
|
||||
|
||||
function resetPasswordCodeInputGUI() {
|
||||
logToConsole(LOG_DEBUG | LOG_WARN, `[VRR.GUI] Server reports password reset email confirmation was successful. Asking for code ...`);
|
||||
logToConsole(LOG_DEBUG | LOG_WARN, `[AGRP.GUI] Server reports password reset email confirmation was successful. Asking for code ...`);
|
||||
closeAllWindows();
|
||||
|
||||
passwordReset.messageLabel.text = getLocaleString("GUIResetPasswordCodeInputLabel");
|
||||
@@ -173,7 +173,7 @@ function resetPasswordCodeInputGUI() {
|
||||
// ===========================================================================
|
||||
|
||||
function resetPasswordEmailInputGUI() {
|
||||
logToConsole(LOG_DEBUG | LOG_WARN, `[VRR.GUI] Server reports password reset request was approved. Asking for email ...`);
|
||||
logToConsole(LOG_DEBUG | LOG_WARN, `[AGRP.GUI] Server reports password reset request was approved. Asking for email ...`);
|
||||
closeAllWindows();
|
||||
|
||||
passwordReset.messageLabel.text = getLocaleString("GUIResetPasswordConfirmEmailLabel");
|
||||
|
||||
@@ -19,7 +19,7 @@ let yesNoDialog = {
|
||||
// ===========================================================================
|
||||
|
||||
function initYesNoDialogGUI() {
|
||||
logToConsole(LOG_DEBUG, `[VRR.GUI] Created prompt GUI ...`);
|
||||
logToConsole(LOG_DEBUG, `[AGRP.GUI] Created prompt GUI ...`);
|
||||
yesNoDialog.window = mexui.window(game.width / 2 - 200, game.height / 2 - 70, 400, 140, 'Question', {
|
||||
main: {
|
||||
backgroundColour: toColour(secondaryColour[0], secondaryColour[1], secondaryColour[2], windowAlpha),
|
||||
@@ -74,14 +74,14 @@ function initYesNoDialogGUI() {
|
||||
borderColour: toColour(primaryColour[0], primaryColour[1], primaryColour[2], 255),
|
||||
},
|
||||
}, yesNoDialogAnswerNo);
|
||||
logToConsole(LOG_DEBUG, `[VRR.GUI] Created prompt GUI`);
|
||||
logToConsole(LOG_DEBUG, `[AGRP.GUI] Created prompt GUI`);
|
||||
}
|
||||
|
||||
// ===========================================================================
|
||||
|
||||
function showYesNoPromptGUI(promptMessage, promptTitle, yesButtonText, noButtonText) {
|
||||
closeAllWindows();
|
||||
logToConsole(LOG_DEBUG, `[VRR.GUI] Showing prompt window. Prompt: ${promptTitle} - ${promptMessage}`);
|
||||
logToConsole(LOG_DEBUG, `[AGRP.GUI] Showing prompt window. Prompt: ${promptTitle} - ${promptMessage}`);
|
||||
mexui.setInput(true);
|
||||
|
||||
yesNoDialog.messageLabel.text = "";
|
||||
@@ -100,7 +100,7 @@ function showYesNoPromptGUI(promptMessage, promptTitle, yesButtonText, noButtonT
|
||||
// ===========================================================================
|
||||
|
||||
function yesNoDialogAnswerNo() {
|
||||
logToConsole(LOG_DEBUG, `[VRR.GUI] Responding with answer NO to server prompt`);
|
||||
logToConsole(LOG_DEBUG, `[AGRP.GUI] Responding with answer NO to server prompt`);
|
||||
sendNetworkEventToServer("agrp.promptAnswerNo");
|
||||
closeAllWindows();
|
||||
}
|
||||
@@ -108,7 +108,7 @@ function yesNoDialogAnswerNo() {
|
||||
// ===========================================================================
|
||||
|
||||
function yesNoDialogAnswerYes() {
|
||||
logToConsole(LOG_DEBUG, `[VRR.GUI] Responding with answer YES to server prompt`);
|
||||
logToConsole(LOG_DEBUG, `[AGRP.GUI] Responding with answer YES to server prompt`);
|
||||
sendNetworkEventToServer("agrp.promptAnswerYes");
|
||||
closeAllWindows();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user