This commit is contained in:
Vortrex
2023-02-08 18:04:27 -06:00
parent 77114a14a3
commit bacdc063d4
62 changed files with 645 additions and 645 deletions

View File

@@ -20,7 +20,7 @@ let twoFactorAuth = {
// ===========================================================================
function initTwoFactorAuthenticationGUI() {
logToConsole(LOG_DEBUG, `[AGRP.GUI] Creating two factor auth GUI ...`);
logToConsole(LOG_DEBUG, `[V.RP.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),
@@ -94,14 +94,14 @@ function initTwoFactorAuthenticationGUI() {
},
}, checkTwoFactorAuth);
logToConsole(LOG_DEBUG, `[AGRP.GUI] Created two factor auth GUI`);
logToConsole(LOG_DEBUG, `[V.RP.GUI] Created two factor auth GUI`);
}
// ===========================================================================
function showTwoFactorAuthGUI() {
closeAllWindows();
logToConsole(LOG_DEBUG, `[AGRP.GUI] Showing two-factor authentication window`);
logToConsole(LOG_DEBUG, `[V.RP.GUI] Showing two-factor authentication window`);
setChatWindowEnabled(false);
mexui.setInput(true);
twoFactorAuth.window.shown = true;
@@ -112,7 +112,7 @@ function showTwoFactorAuthGUI() {
// ===========================================================================
function twoFactorAuthFailed(errorMessage) {
logToConsole(LOG_DEBUG, `[AGRP.GUI] Server reports two-factor authentication failed. Reason: ${errorMessage}`);
logToConsole(LOG_DEBUG, `[V.RP.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 = "";
@@ -121,14 +121,14 @@ function twoFactorAuthFailed(errorMessage) {
// ===========================================================================
function twoFactorAuthSuccess() {
logToConsole(LOG_DEBUG, `[AGRP.GUI] Server reports two-factor authentication was successful`);
logToConsole(LOG_DEBUG, `[V.RP.GUI] Server reports two-factor authentication was successful`);
closeAllWindows();
}
// ===========================================================================
function checkTwoFactorAuth() {
logToConsole(LOG_DEBUG, `[AGRP.GUI] Checking two-factor authentication with server ...`);
logToConsole(LOG_DEBUG, `[V.RP.GUI] Checking two-factor authentication with server ...`);
sendNetworkEventToServer("v.rp.2fa", twoFactorAuth.codeInput.lines[0]);
}

View File

@@ -19,7 +19,7 @@ let passwordChange = {
// ===========================================================================
function initChangePasswordGUI() {
logToConsole(LOG_DEBUG, `[AGRP.GUI] Creating password change GUI ...`);
logToConsole(LOG_DEBUG, `[V.RP.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),
@@ -110,13 +110,13 @@ function initChangePasswordGUI() {
borderColour: toColour(primaryColour[0], primaryColour[1], primaryColour[2], buttonAlpha),
},
}, checkChangePassword);
logToConsole(LOG_DEBUG, `[AGRP.GUI] Created change password GUI`);
logToConsole(LOG_DEBUG, `[V.RP.GUI] Created change password GUI`);
}
// ===========================================================================
function passwordChangeFailed(errorMessage) {
logToConsole(LOG_DEBUG, `[AGRP.GUI] Server reports change password failed. Reason: ${errorMessage}`);
logToConsole(LOG_DEBUG, `[V.RP.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 = "";
@@ -127,14 +127,14 @@ function passwordChangeFailed(errorMessage) {
// ===========================================================================
function checkChangePassword() {
logToConsole(LOG_DEBUG, `[AGRP.GUI] Checking password change with server ...`);
logToConsole(LOG_DEBUG, `[V.RP.GUI] Checking password change with server ...`);
sendNetworkEventToServer("v.rp.checkChangePassword", passwordChange.passwordInput.lines[0], passwordChange.confirmPasswordInput.lines[0]);
}
// ===========================================================================
function showChangePasswordGUI(errorMessage) {
logToConsole(LOG_DEBUG, `[AGRP.GUI] Showing change password window`);
logToConsole(LOG_DEBUG, `[V.RP.GUI] Showing change password window`);
closeAllWindows();
setChatWindowEnabled(false);
mexui.setInput(true);
@@ -149,7 +149,7 @@ function showChangePasswordGUI(errorMessage) {
// ===========================================================================
function passwordChangeSuccess() {
logToConsole(LOG_DEBUG, `[AGRP.GUI] Server reports password change was successful`);
logToConsole(LOG_DEBUG, `[V.RP.GUI] Server reports password change was successful`);
guiSubmitKey = false;
closeAllWindows();
}

View File

@@ -23,7 +23,7 @@ let characterSelect = {
// ===========================================================================
function initCharacterSelectGUI() {
logToConsole(LOG_DEBUG, `[AGRP.GUI] Creating character select GUI ...`);
logToConsole(LOG_DEBUG, `[V.RP.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),
@@ -150,14 +150,14 @@ function initCharacterSelectGUI() {
borderColour: toColour(0, 0, 0, 0),
}
});
logToConsole(LOG_DEBUG, `[AGRP.GUI] Created character select GUI`);
logToConsole(LOG_DEBUG, `[V.RP.GUI] Created character select GUI`);
}
// ===========================================================================
function showCharacterSelectGUI(firstName, lastName, cash, clan, lastPlayed, skinId) {
closeAllWindows();
logToConsole(LOG_DEBUG, `[AGRP.GUI] Showing character selection window`);
logToConsole(LOG_DEBUG, `[V.RP.GUI] Showing character selection window`);
setChatWindowEnabled(false);
mexui.setInput(true);
characterSelect.nameText.text = `${firstName} ${lastName}`;
@@ -178,35 +178,35 @@ function showCharacterSelectGUI(firstName, lastName, cash, clan, lastPlayed, ski
function showNewCharacter() {
closeAllWindows();
logToConsole(LOG_DEBUG, `[AGRP.GUI] Showing new character dialog window`);
logToConsole(LOG_DEBUG, `[V.RP.GUI] Showing new character dialog window`);
showNewCharacterGUI();
}
// ===========================================================================
function selectNextCharacter() {
logToConsole(LOG_DEBUG, `[AGRP.GUI] Requesting next character info from server for character select window`);
logToConsole(LOG_DEBUG, `[V.RP.GUI] Requesting next character info from server for character select window`);
sendNetworkEventToServer("v.rp.nextCharacter");
}
// ===========================================================================
function selectPreviousCharacter() {
logToConsole(LOG_DEBUG, `[AGRP.GUI] Requesting previous character info from server for character select window`);
logToConsole(LOG_DEBUG, `[V.RP.GUI] Requesting previous character info from server for character select window`);
sendNetworkEventToServer("v.rp.previousCharacter");
}
// ===========================================================================
function selectThisCharacter() {
logToConsole(LOG_DEBUG, `[AGRP.GUI] Tell server the current shown character was selected in character select window`);
logToConsole(LOG_DEBUG, `[V.RP.GUI] Tell server the current shown character was selected in character select window`);
sendNetworkEventToServer("v.rp.selectCharacter");
}
// ===========================================================================
function switchCharacterSelectGUI(firstName, lastName, cash, clan, lastPlayed, skinId) {
logToConsole(LOG_DEBUG, `[AGRP.GUI] Updating character info with data from server`);
logToConsole(LOG_DEBUG, `[V.RP.GUI] Updating character info with data from server`);
setChatWindowEnabled(false);
characterSelect.window.shown = false;
characterSelect.nameText.text = `${firstName} ${lastName}`;
@@ -229,7 +229,7 @@ function switchCharacterSelectGUI(firstName, lastName, cash, clan, lastPlayed, s
// ===========================================================================
function characterSelectSuccess() {
logToConsole(LOG_DEBUG, `[AGRP.GUI] Server reports character selection was successful`);
logToConsole(LOG_DEBUG, `[V.RP.GUI] Server reports character selection was successful`);
closeAllWindows();
}

View File

@@ -16,7 +16,7 @@ let errorDialog = {
// ===========================================================================
function initErrorDialogGUI() {
logToConsole(LOG_DEBUG, `[AGRP.GUI] Creating error GUI ...`);
logToConsole(LOG_DEBUG, `[V.RP.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),
@@ -58,14 +58,14 @@ function initErrorDialogGUI() {
borderColour: toColour(primaryColour[0], primaryColour[1], primaryColour[2], 255),
},
}, closeErrorDialog);
logToConsole(LOG_DEBUG, `[AGRP.GUI] Created error GUI ...`);
logToConsole(LOG_DEBUG, `[V.RP.GUI] Created error GUI ...`);
}
// ===========================================================================
function showErrorGUI(errorMessage, errorTitle, buttonText) {
closeAllWindows();
logToConsole(LOG_DEBUG, `[AGRP.GUI] Showing error window. Error: ${errorTitle} - ${errorMessage}`);
logToConsole(LOG_DEBUG, `[V.RP.GUI] Showing error window. Error: ${errorTitle} - ${errorMessage}`);
setChatWindowEnabled(false);
mexui.setInput(true);
errorDialog.messageLabel.text = errorMessage;
@@ -77,7 +77,7 @@ function showErrorGUI(errorMessage, errorTitle, buttonText) {
// ===========================================================================
function closeErrorDialog() {
logToConsole(LOG_DEBUG, `[AGRP.GUI] Closing error dialog`);
logToConsole(LOG_DEBUG, `[V.RP.GUI] Closing error dialog`);
errorDialog.window.shown = false;
mexui.setInput(false);
}

View File

@@ -13,7 +13,7 @@ let fiveCardPokerGUI = {
function initFiveCardPokerGUI() {
// Render a five card poker game in MexUI
//logToConsole(LOG_DEBUG, `[AGRP.GUI] Creating five-card poker GUI ...`);
//logToConsole(LOG_DEBUG, `[V.RP.GUI] Creating five-card poker GUI ...`);
fiveCardPokerGUI.window = mexui.window(game.width / 2 - 200, game.height - 150, 400, 400, 'Five Card Poker', {
main: {
backgroundColour: toColour(secondaryColour[0], secondaryColour[1], secondaryColour[2], 0),
@@ -33,7 +33,7 @@ function initFiveCardPokerGUI() {
fiveCardPokerGUI.window.shown = false;
logToConsole(LOG_DEBUG, `[AGRP.GUI] Created five card poker GUI`);
logToConsole(LOG_DEBUG, `[V.RP.GUI] Created five card poker GUI`);
}
// ===========================================================================

View File

@@ -22,7 +22,7 @@ let dealerCards = [];
function initBlackJackGUI() {
// Render a blackjack game in MexUI
logToConsole(LOG_DEBUG, `[AGRP.GUI] Creating blackjack GUI ...`);
logToConsole(LOG_DEBUG, `[V.RP.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),
@@ -42,7 +42,7 @@ function initBlackJackGUI() {
blackJackGUI.window.shown = false;
logToConsole(LOG_DEBUG, `[AGRP.GUI] Created blackjack GUI`);
logToConsole(LOG_DEBUG, `[V.RP.GUI] Created blackjack GUI`);
}
// ===========================================================================

View File

@@ -16,7 +16,7 @@ let infoDialog = {
// ===========================================================================
function initInfoDialogGUI() {
logToConsole(LOG_DEBUG, `[AGRP.GUI] Creating info dialog GUI ...`);
logToConsole(LOG_DEBUG, `[V.RP.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),
@@ -57,13 +57,13 @@ function initInfoDialogGUI() {
borderColour: toColour(primaryColour[0], primaryColour[1], primaryColour[2], 255),
},
}, closeInfoDialog);
logToConsole(LOG_DEBUG, `[AGRP.GUI] Created info dialog GUI`);
logToConsole(LOG_DEBUG, `[V.RP.GUI] Created info dialog GUI`);
}
// ===========================================================================
function closeInfoDialog() {
logToConsole(LOG_DEBUG, `[AGRP.GUI] Closing info dialog`);
logToConsole(LOG_DEBUG, `[V.RP.GUI] Closing info dialog`);
infoDialog.window.shown = false;
mexui.setInput(false);
}
@@ -72,7 +72,7 @@ function closeInfoDialog() {
function showInfoGUI(infoMessage, infoTitle, buttonText) {
closeAllWindows();
logToConsole(LOG_DEBUG, `[AGRP.GUI] Showing info dialog window. Info: ${infoTitle} - ${infoMessage}`);
logToConsole(LOG_DEBUG, `[V.RP.GUI] Showing info dialog window. Info: ${infoTitle} - ${infoMessage}`);
mexui.setInput(true);
infoDialog.messageLabel.text = infoMessage;
infoDialog.okayButton.text = buttonText;

View File

@@ -25,7 +25,7 @@ function initInventoryGUI() {
// ===========================================================================
function closeAllInventoryGUI() {
logToConsole(LOG_DEBUG, `[AGRP.GUI] Closing all inventory GUI`);
logToConsole(LOG_DEBUG, `[V.RP.GUI] Closing all inventory GUI`);
for (let i in inventoryGUI) {
inventoryGUI[i].window.shown = false;
}
@@ -36,7 +36,7 @@ function closeAllInventoryGUI() {
function showInventoryGUI(inventoryIndex, items) {
closeAllWindows();
logToConsole(LOG_DEBUG, `[AGRP.GUI] Showing inventory window. Index: ${inventoryIndex}`);
logToConsole(LOG_DEBUG, `[V.RP.GUI] Showing inventory window. Index: ${inventoryIndex}`);
inventoryGUI[inventoryIndex].window.shown = true;
mexui.setInput(true);
}

View File

@@ -25,7 +25,7 @@ function initInventoryBulkGUI() {
// ===========================================================================
function closeAllInventoryBulkGUI() {
logToConsole(LOG_DEBUG, `[AGRP.GUI] Closing all bulk inventory GUI`);
logToConsole(LOG_DEBUG, `[V.RP.GUI] Closing all bulk inventory GUI`);
for (let i in inventoryBulkGUI) {
inventoryBulkGUI[i].window.shown = false;
}
@@ -36,7 +36,7 @@ function closeAllInventoryBulkGUI() {
function showInventoryBulkGUI(inventoryIndex, items) {
closeAllWindows();
logToConsole(LOG_DEBUG, `[AGRP.GUI] Showing bulk inventory window. Index: ${inventoryIndex}`);
logToConsole(LOG_DEBUG, `[V.RP.GUI] Showing bulk inventory window. Index: ${inventoryIndex}`);
inventoryBulkGUI[inventoryIndex].window.shown = true;
mexui.setInput(true);
}

View File

@@ -18,7 +18,7 @@ let listDialog = {
// ===========================================================================
function initListGUI() {
logToConsole(LOG_DEBUG, `[AGRP.GUI] Creating list dialog GUI ...`);
logToConsole(LOG_DEBUG, `[V.RP.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),
@@ -72,14 +72,14 @@ function initListGUI() {
}
}
});
logToConsole(LOG_DEBUG, `[AGRP.GUI] Created list dialog GUI`);
logToConsole(LOG_DEBUG, `[V.RP.GUI] Created list dialog GUI`);
}
// ===========================================================================
function showListGUI() {
closeAllWindows();
logToConsole(LOG_DEBUG, `[AGRP.GUI] Showing list window`);
logToConsole(LOG_DEBUG, `[V.RP.GUI] Showing list window`);
setChatWindowEnabled(false);
mexui.setInput(true);
listDialog.window.shown = true;

View File

@@ -19,7 +19,7 @@ let flagImageGap = toVector2(5, 5);
// ===========================================================================
function initLocaleChooserGUI() {
logToConsole(LOG_DEBUG, `[AGRP.GUI] Creating locale chooser GUI ...`);
logToConsole(LOG_DEBUG, `[V.RP.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),
@@ -39,13 +39,13 @@ function initLocaleChooserGUI() {
localeChooser.window.shown = false;
logToConsole(LOG_DEBUG, `[AGRP.GUI] Created locale chooser GUI`);
logToConsole(LOG_DEBUG, `[V.RP.GUI] Created locale chooser GUI`);
}
// ===========================================================================
function closeLocaleChooserGUI() {
logToConsole(LOG_DEBUG, `[AGRP.GUI] Closing locale chooser window`);
logToConsole(LOG_DEBUG, `[V.RP.GUI] Closing locale chooser window`);
localeChooser.window.shown = false;
for (let i in localeChooser.flagImages) {
localeChooser.flagImages[i].shown = false;
@@ -63,7 +63,7 @@ function showLocaleChooserGUI(position = toVector2(0.0, 0.0)) {
}
//closeAllWindows();
logToConsole(LOG_DEBUG, `[AGRP.GUI] Showing locale chooser window`);
logToConsole(LOG_DEBUG, `[V.RP.GUI] Showing locale chooser window`);
mexui.setInput(true);
localeChooser.window.shown = true;
@@ -85,14 +85,14 @@ function toggleLocaleChooserGUI() {
// ===========================================================================
function localeChooserSetLocale(localeId) {
logToConsole(LOG_DEBUG | LOG_WARN, `[AGRP.GUI] Asking server to change locale to ${localeId}`);
logToConsole(LOG_DEBUG | LOG_WARN, `[V.RP.GUI] Asking server to change locale to ${localeId}`);
sendLocaleSelectToServer(localeId);
}
// ===========================================================================
function resetLocaleChooserOptions() {
logToConsole(LOG_DEBUG | LOG_WARN, `[AGRP.GUI] Resetting locale chooser options`);
logToConsole(LOG_DEBUG | LOG_WARN, `[V.RP.GUI] Resetting locale chooser options`);
// let tempLocaleOptions = getServerData().localeOptions; // getAvailableLocaleOptions();
let tempLocaleOptions = getAvailableLocaleOptions();
@@ -116,7 +116,7 @@ function resetLocaleChooserOptions() {
localeChooser.flagImages[i].shown = false;
logToConsole(LOG_DEBUG | LOG_WARN, `[AGRP.GUI] Created locale chooser option ${tempLocaleOptions[i].englishName} with image ${imagePath}`);
logToConsole(LOG_DEBUG | LOG_WARN, `[V.RP.GUI] Created locale chooser option ${tempLocaleOptions[i].englishName} with image ${imagePath}`);
//localeChooser.activeRingImages.push(activeRingImage);
}

View File

@@ -42,7 +42,7 @@ let loginHTML =
// ===========================================================================
function initLoginGUI() {
logToConsole(LOG_DEBUG, `[AGRP.GUI] Creating login GUI ...`);
logToConsole(LOG_DEBUG, `[V.RP.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),
@@ -143,14 +143,14 @@ function initLoginGUI() {
},
});
logToConsole(LOG_DEBUG, `[AGRP.GUI] Created login GUI`);
logToConsole(LOG_DEBUG, `[V.RP.GUI] Created login GUI`);
}
// ===========================================================================
function showLoginGUI() {
closeAllWindows();
logToConsole(LOG_DEBUG, `[AGRP.GUI] Showing login window`);
logToConsole(LOG_DEBUG, `[V.RP.GUI] Showing login window`);
setChatWindowEnabled(false);
mexui.setInput(true);
login.window.shown = true;
@@ -164,14 +164,14 @@ function showLoginGUI() {
// ===========================================================================
function checkLogin() {
logToConsole(LOG_DEBUG, `[AGRP.GUI] Checking login with server ...`);
logToConsole(LOG_DEBUG, `[V.RP.GUI] Checking login with server ...`);
sendNetworkEventToServer("v.rp.checkLogin", login.passwordInput.lines[0]);
}
// ===========================================================================
function loginFailed(errorMessage) {
logToConsole(LOG_DEBUG, `[AGRP.GUI] Server reports login failed`);
logToConsole(LOG_DEBUG, `[V.RP.GUI] Server reports login failed`);
login.messageLabel.text = errorMessage;
login.messageLabel.styles.main.textColour = toColour(180, 32, 32, 255);
login.passwordInput.text = "";
@@ -180,7 +180,7 @@ function loginFailed(errorMessage) {
// ===========================================================================
function loginSuccess() {
logToConsole(LOG_DEBUG, `[AGRP.GUI] Server reports login was successful`);
logToConsole(LOG_DEBUG, `[V.RP.GUI] Server reports login was successful`);
guiSubmitKey = false;
closeAllWindows();
}
@@ -189,7 +189,7 @@ function loginSuccess() {
function switchToPasswordResetGUI() {
//closeAllWindows();
//logToConsole(LOG_DEBUG, `[AGRP.GUI] Showing password reset dialog window`);
//logToConsole(LOG_DEBUG, `[V.RP.GUI] Showing password reset dialog window`);
//showResetPasswordGUI();
sendNetworkEventToServer("v.rp.checkResetPassword", "");
return false;

View File

@@ -19,7 +19,7 @@ let newCharacter = {
// ===========================================================================
function initNewCharacterGUI() {
logToConsole(LOG_DEBUG, `[AGRP.GUI] Creating new character GUI ...`);
logToConsole(LOG_DEBUG, `[V.RP.GUI] Creating new character GUI ...`);
newCharacter.window = mexui.window(getScreenWidth() / 2 - 150, getScreenHeight() / 2 - 115, 300, 230, 'NEW CHARACTER', {
main: {
backgroundColour: toColour(secondaryColour[0], secondaryColour[1], secondaryColour[2], windowAlpha),
@@ -110,13 +110,13 @@ function initNewCharacterGUI() {
borderColour: toColour(primaryColour[0], primaryColour[1], primaryColour[2], buttonAlpha),
},
}, checkNewCharacter);
logToConsole(LOG_DEBUG, `[AGRP.GUI] Created new character GUI`);
logToConsole(LOG_DEBUG, `[V.RP.GUI] Created new character GUI`);
}
// ===========================================================================
function newCharacterFailed(errorMessage) {
logToConsole(LOG_DEBUG, `[AGRP.GUI] Server reports new character creation failed. Reason: ${errorMessage}`);
logToConsole(LOG_DEBUG, `[V.RP.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 = "";
@@ -134,7 +134,7 @@ function newCharacterFailed(errorMessage) {
// ===========================================================================
function checkNewCharacter() {
logToConsole(LOG_DEBUG, `[AGRP.GUI] Checking new character with server ...`);
logToConsole(LOG_DEBUG, `[V.RP.GUI] Checking new character with server ...`);
if (newCharacter.firstNameInput.lines[0].length < 2) {
return false;
}
@@ -152,7 +152,7 @@ function checkNewCharacter() {
// ===========================================================================
function showNewCharacterGUI() {
logToConsole(LOG_DEBUG, `[AGRP.GUI] Showing new character window`);
logToConsole(LOG_DEBUG, `[V.RP.GUI] Showing new character window`);
closeAllWindows();
setChatWindowEnabled(false);
mexui.setInput(true);

View File

@@ -20,7 +20,7 @@ let register = {
// ===========================================================================
function initRegisterGUI() {
logToConsole(LOG_DEBUG, `[AGRP.GUI] Creating register GUI ...`);
logToConsole(LOG_DEBUG, `[V.RP.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),
@@ -130,13 +130,13 @@ function initRegisterGUI() {
borderColour: toColour(primaryColour[0], primaryColour[1], primaryColour[2], buttonAlpha),
},
}, checkRegistration);
logToConsole(LOG_DEBUG, `[AGRP.GUI] Created register GUI`);
logToConsole(LOG_DEBUG, `[V.RP.GUI] Created register GUI`);
}
// ===========================================================================
function registrationFailed(errorMessage) {
logToConsole(LOG_DEBUG, `[AGRP.GUI] Server reports registration failed. Reason: ${errorMessage}`);
logToConsole(LOG_DEBUG, `[V.RP.GUI] Server reports registration failed. Reason: ${errorMessage}`);
register.messageLabel.text = errorMessage;
register.messageLabel.styles.main.textColour = toColour(180, 32, 32, 255);
register.passwordInput.text = "";
@@ -147,14 +147,14 @@ function registrationFailed(errorMessage) {
// ===========================================================================
function checkRegistration() {
logToConsole(LOG_DEBUG, `[AGRP.GUI] Checking registration with server ...`);
logToConsole(LOG_DEBUG, `[V.RP.GUI] Checking registration with server ...`);
sendNetworkEventToServer("v.rp.checkRegistration", register.passwordInput.lines[0], register.confirmPasswordInput.lines[0], register.emailInput.lines[0]);
}
// ===========================================================================
function showRegistrationGUI() {
logToConsole(LOG_DEBUG, `[AGRP.GUI] Showing registration window`);
logToConsole(LOG_DEBUG, `[V.RP.GUI] Showing registration window`);
closeAllWindows();
setChatWindowEnabled(false);
mexui.setInput(true);
@@ -170,7 +170,7 @@ function showRegistrationGUI() {
// ===========================================================================
function registrationSuccess() {
logToConsole(LOG_DEBUG, `[AGRP.GUI] Server reports registration was successful`);
logToConsole(LOG_DEBUG, `[V.RP.GUI] Server reports registration was successful`);
guiSubmitKey = false;
closeAllWindows();
}

View File

@@ -20,7 +20,7 @@ let passwordReset = {
// ===========================================================================
function initResetPasswordGUI() {
logToConsole(LOG_DEBUG, `[AGRP.GUI] Creating password reset GUI ...`);
logToConsole(LOG_DEBUG, `[V.RP.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),
@@ -120,14 +120,14 @@ function initResetPasswordGUI() {
},
});
logToConsole(LOG_DEBUG, `[AGRP.GUI] Created password reset GUI`);
logToConsole(LOG_DEBUG, `[V.RP.GUI] Created password reset GUI`);
}
// ===========================================================================
function showResetPasswordGUI() {
closeAllWindows();
logToConsole(LOG_DEBUG, `[AGRP.GUI] Showing password reset window`);
logToConsole(LOG_DEBUG, `[V.RP.GUI] Showing password reset window`);
setChatWindowEnabled(false);
mexui.setInput(true);
passwordReset.window.shown = true;
@@ -141,14 +141,14 @@ function showResetPasswordGUI() {
// ===========================================================================
function checkResetPassword() {
logToConsole(LOG_DEBUG, `[AGRP.GUI] Checking password reset with server (${passwordReset.emailInput.lines[0]}) ...`);
logToConsole(LOG_DEBUG, `[V.RP.GUI] Checking password reset with server (${passwordReset.emailInput.lines[0]}) ...`);
sendNetworkEventToServer("v.rp.checkResetPassword", passwordReset.emailInput.lines[0]);
}
// ===========================================================================
function resetPasswordFailed(errorMessage) {
logToConsole(LOG_DEBUG, `[AGRP.GUI] Server reports password reset failed`);
logToConsole(LOG_DEBUG, `[V.RP.GUI] Server reports password reset failed`);
passwordReset.messageLabel.text = errorMessage;
passwordReset.messageLabel.styles.main.textColour = toColour(180, 32, 32, 255);
passwordReset.emailInput.text = "";
@@ -157,7 +157,7 @@ function resetPasswordFailed(errorMessage) {
// ===========================================================================
function resetPasswordCodeInputGUI() {
logToConsole(LOG_DEBUG | LOG_WARN, `[AGRP.GUI] Server reports password reset email confirmation was successful. Asking for code ...`);
logToConsole(LOG_DEBUG | LOG_WARN, `[V.RP.GUI] Server reports password reset email confirmation was successful. Asking for code ...`);
closeAllWindows();
passwordReset.messageLabel.text = getLocaleString("GUIResetPasswordCodeInputLabel");
@@ -172,7 +172,7 @@ function resetPasswordCodeInputGUI() {
// ===========================================================================
function resetPasswordEmailInputGUI() {
logToConsole(LOG_DEBUG | LOG_WARN, `[AGRP.GUI] Server reports password reset request was approved. Asking for email ...`);
logToConsole(LOG_DEBUG | LOG_WARN, `[V.RP.GUI] Server reports password reset request was approved. Asking for email ...`);
closeAllWindows();
passwordReset.messageLabel.text = getLocaleString("GUIResetPasswordConfirmEmailLabel");

View File

@@ -18,7 +18,7 @@ let yesNoDialog = {
// ===========================================================================
function initYesNoDialogGUI() {
logToConsole(LOG_DEBUG, `[AGRP.GUI] Created prompt GUI ...`);
logToConsole(LOG_DEBUG, `[V.RP.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),
@@ -73,14 +73,14 @@ function initYesNoDialogGUI() {
borderColour: toColour(primaryColour[0], primaryColour[1], primaryColour[2], 255),
},
}, yesNoDialogAnswerNo);
logToConsole(LOG_DEBUG, `[AGRP.GUI] Created prompt GUI`);
logToConsole(LOG_DEBUG, `[V.RP.GUI] Created prompt GUI`);
}
// ===========================================================================
function showYesNoPromptGUI(promptMessage, promptTitle, yesButtonText, noButtonText) {
closeAllWindows();
logToConsole(LOG_DEBUG, `[AGRP.GUI] Showing prompt window. Prompt: ${promptTitle} - ${promptMessage}`);
logToConsole(LOG_DEBUG, `[V.RP.GUI] Showing prompt window. Prompt: ${promptTitle} - ${promptMessage}`);
mexui.setInput(true);
yesNoDialog.messageLabel.text = "";
@@ -99,7 +99,7 @@ function showYesNoPromptGUI(promptMessage, promptTitle, yesButtonText, noButtonT
// ===========================================================================
function yesNoDialogAnswerNo() {
logToConsole(LOG_DEBUG, `[AGRP.GUI] Responding with answer NO to server prompt`);
logToConsole(LOG_DEBUG, `[V.RP.GUI] Responding with answer NO to server prompt`);
sendNetworkEventToServer("v.rp.promptAnswerNo");
closeAllWindows();
}
@@ -107,7 +107,7 @@ function yesNoDialogAnswerNo() {
// ===========================================================================
function yesNoDialogAnswerYes() {
logToConsole(LOG_DEBUG, `[AGRP.GUI] Responding with answer YES to server prompt`);
logToConsole(LOG_DEBUG, `[V.RP.GUI] Responding with answer YES to server prompt`);
sendNetworkEventToServer("v.rp.promptAnswerYes");
closeAllWindows();
}