diff --git a/scripts/client/gui.js b/scripts/client/gui.js index 7930102f..a98a2854 100644 --- a/scripts/client/gui.js +++ b/scripts/client/gui.js @@ -73,7 +73,7 @@ function initGUI() { resetGUIStrings(); resetLocaleChooserOptions(); - sendNetworkEventToServer("vrr.guiReady", true); + sendNetworkEventToServer("agrp.guiReady", true); }; // =========================================================================== @@ -230,7 +230,7 @@ function processGUIKeyPress(keyCode) { function processToggleGUIKeyPress(keyCode) { if (keyCode == disableGUIKey) { - sendNetworkEventToServer("vrr.toggleGUI"); + sendNetworkEventToServer("agrp.toggleGUI"); } } diff --git a/scripts/client/gui/2fa.js b/scripts/client/gui/2fa.js index 8bdebc81..31efe267 100644 --- a/scripts/client/gui/2fa.js +++ b/scripts/client/gui/2fa.js @@ -21,7 +21,7 @@ let twoFactorAuth = { function initTwoFactorAuthenticationGUI() { logToConsole(LOG_DEBUG, `[VRR.GUI] Creating two factor auth GUI ...`); - twoFactorAuth.window = mexui.window(game.width/2-150, game.height/2-129, 300, 258, 'LOGIN', { + 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), transitionTime: 500, @@ -38,7 +38,7 @@ function initTwoFactorAuthenticationGUI() { borderColour: toColour(0, 0, 0, 0), }, }); - twoFactorAuth.window.titleBarIconSize = toVector2(0,0); + twoFactorAuth.window.titleBarIconSize = toVector2(0, 0); twoFactorAuth.window.titleBarHeight = 0; twoFactorAuth.qrCode = twoFactorAuth.window.image(100, 20, 100, 100, mainLogoPath, { @@ -129,7 +129,7 @@ function twoFactorAuthSuccess() { function checkTwoFactorAuth() { logToConsole(LOG_DEBUG, `[VRR.GUI] Checking two-factor authentication with server ...`); - sendNetworkEventToServer("vrr.2fa", twoFactorAuth.codeInput.lines[0]); + sendNetworkEventToServer("agrp.2fa", twoFactorAuth.codeInput.lines[0]); } // =========================================================================== \ No newline at end of file diff --git a/scripts/client/gui/changepass.js b/scripts/client/gui/changepass.js index c600245e..0186e1dd 100644 --- a/scripts/client/gui/changepass.js +++ b/scripts/client/gui/changepass.js @@ -128,7 +128,7 @@ function passwordChangeFailed(errorMessage) { function checkChangePassword() { logToConsole(LOG_DEBUG, `[VRR.GUI] Checking password change with server ...`); - sendNetworkEventToServer("vrr.checkChangePassword", passwordChange.passwordInput.lines[0], passwordChange.confirmPasswordInput.lines[0]); + sendNetworkEventToServer("agrp.checkChangePassword", passwordChange.passwordInput.lines[0], passwordChange.confirmPasswordInput.lines[0]); } // =========================================================================== diff --git a/scripts/client/gui/charselect.js b/scripts/client/gui/charselect.js index 434e3a91..46e16e7d 100644 --- a/scripts/client/gui/charselect.js +++ b/scripts/client/gui/charselect.js @@ -23,23 +23,23 @@ let characterSelect = { // =========================================================================== function initCharacterSelectGUI() { - logToConsole(LOG_DEBUG, `[VRR.GUI] Creating character select GUI ...`); - characterSelect.window = mexui.window(game.width/2-215, game.height/2-83, 430, 190, 'SELECT CHARACTER', { + logToConsole(LOG_DEBUG, `[VRR.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), }, - title: { + title: { textSize: 12.0, textFont: mainFont, - textColour: toColour(0, 0, 0, 255), - backgroundColour: toColour(primaryColour[0], primaryColour[1], primaryColour[2], windowTitleAlpha), - }, - icon: { + textColour: toColour(0, 0, 0, 255), + backgroundColour: toColour(primaryColour[0], primaryColour[1], primaryColour[2], windowTitleAlpha), + }, + icon: { textSize: 10.0, textFont: mainFont, - textColour: toColour(0, 0, 0, 255), - backgroundColour: toColour(primaryColour[0], primaryColour[1], primaryColour[2], windowTitleAlpha), - } + textColour: toColour(0, 0, 0, 255), + backgroundColour: toColour(primaryColour[0], primaryColour[1], primaryColour[2], windowTitleAlpha), + } }); characterSelect.window.titleBarIconSize = toVector2(0, 0); characterSelect.window.titleBarIconShown = false; @@ -171,7 +171,7 @@ function showCharacterSelectGUI(firstName, lastName, cash, clan, lastPlayed, ski guiLeftKey = selectPreviousCharacter; guiRightKey = selectNextCharacter; - showLocaleChooserGUI(new Vec2(getScreenWidth()/2-(localeChooser.window.size.x/2), characterSelect.window.position.y+characterSelect.window.size.y+20)); + showLocaleChooserGUI(new Vec2(getScreenWidth() / 2 - (localeChooser.window.size.x / 2), characterSelect.window.position.y + characterSelect.window.size.y + 20)); } // =========================================================================== @@ -186,21 +186,21 @@ function showNewCharacter() { function selectNextCharacter() { logToConsole(LOG_DEBUG, `[VRR.GUI] Requesting next character info from server for character select window`); - sendNetworkEventToServer("vrr.nextCharacter"); + sendNetworkEventToServer("agrp.nextCharacter"); } // =========================================================================== function selectPreviousCharacter() { logToConsole(LOG_DEBUG, `[VRR.GUI] Requesting previous character info from server for character select window`); - sendNetworkEventToServer("vrr.previousCharacter"); + sendNetworkEventToServer("agrp.previousCharacter"); } // =========================================================================== function selectThisCharacter() { logToConsole(LOG_DEBUG, `[VRR.GUI] Tell server the current shown character was selected in character select window`); - sendNetworkEventToServer("vrr.selectCharacter"); + sendNetworkEventToServer("agrp.selectCharacter"); } // =========================================================================== @@ -214,7 +214,7 @@ function switchCharacterSelectGUI(firstName, lastName, cash, clan, lastPlayed, s characterSelect.clanText.text = `Clan: ${clan}`; characterSelect.lastPlayedText.text = `Last Played: ${lastPlayed}`; - if(characterSelect.skinImage != null) { + if (characterSelect.skinImage != null) { characterSelect.skinImage.remove(); } characterSelect.skinImage = (getGame() == VRR_GAME_GTA_III) ? characterSelect.window.image(310, 32, 100, 90, `files/images/skins/gta3/${getSkinImage(skinId)}.png`) : characterSelect.window.image(310, 32, 100, 90, "files/images/skins/none.png"); @@ -236,11 +236,11 @@ function characterSelectSuccess() { // =========================================================================== function getSkinImage(skinId, gameId = getGame()) { - if(skinId < 10) { + if (skinId < 10) { return `Skin_00${skinId}.png`; - } else if(skinId > 10 && skinId < 100) { + } else if (skinId > 10 && skinId < 100) { return `Skin_0${skinId}.png`; - } else if(skinId > 100) { + } else if (skinId > 100) { return `Skin_${skinId}.png`; } } diff --git a/scripts/client/gui/login.js b/scripts/client/gui/login.js index e33ef2c2..58b9e870 100644 --- a/scripts/client/gui/login.js +++ b/scripts/client/gui/login.js @@ -20,7 +20,7 @@ let login = { // =========================================================================== let loginHTML = -` + ` Asshat Gaming Roleplay: Login