Scale up server logo on some GUI

This commit is contained in:
Vortrex
2022-01-09 05:23:06 -06:00
parent a526497f48
commit b3ef262697
4 changed files with 38 additions and 35 deletions

View File

@@ -22,7 +22,7 @@ let resetPassword = {
function initResetPasswordGUI() {
logToConsole(LOG_DEBUG, `[VRR.GUI] Creating password reset GUI ...`);
resetPassword.window = mexui.window(game.width/2-150, game.height/2-129, 300, 258, 'RESET PASSWORD', {
resetPassword.window = mexui.window(game.width/2-150, game.height/2-130, 300, 260, 'RESET PASSWORD', {
main: {
backgroundColour: toColour(secondaryColour[0], secondaryColour[1], secondaryColour[2], windowAlpha),
transitionTime: 500,
@@ -42,7 +42,7 @@ function initResetPasswordGUI() {
resetPassword.window.titleBarIconSize = toVector2(0,0);
resetPassword.window.titleBarHeight = 0;
resetPassword.logoImage = resetPassword.window.image(100, 20, 100, 100, mainLogoPath, {
resetPassword.logoImage = resetPassword.window.image(85, -10, 140, 140, mainLogoPath, {
focused: {
borderColour: toColour(0, 0, 0, 0),
},
@@ -95,7 +95,7 @@ function initResetPasswordGUI() {
},
}, checkResetPassword);
resetPassword.backToLoginButton = resetPassword.window.button(200, 240, 60, 15, 'CANCEL', {
resetPassword.backToLoginButton = resetPassword.window.button(200, 240, 80, 15, 'LOGIN', {
main: {
backgroundColour: toColour(primaryColour[0], primaryColour[1], primaryColour[2], buttonAlpha),
textColour: toColour(primaryTextColour[0], primaryTextColour[1], primaryTextColour[2], 255),
@@ -108,7 +108,7 @@ function initResetPasswordGUI() {
},
}, switchToLoginGUI);
resetPassword.backToLoginLabel = resetPassword.window.text(20, 140, 60, 15, 'Remembered your password? Click here >', {
resetPassword.backToLoginLabel = resetPassword.window.text(125, 240, 60, 15, 'Remember your password?', {
main: {
textSize: 8.0,
textAlign: 1.0,
@@ -133,14 +133,14 @@ function showResetPasswordGUI() {
resetPassword.window.shown = true;
mexui.focusedControl = resetPassword.emailInput;
guiSubmitButton = checkResetPassword;
showSmallGameMessage(`If you don't have a mouse cursor, press ${toUpperCase(getKeyNameFromId(disableGUIKey))} to disable GUI`, COLOUR_WHITE, 7500);
//showSmallGameMessage(`If you don't have a mouse cursor, press ${toUpperCase(getKeyNameFromId(disableGUIKey))} to disable GUI`, COLOUR_WHITE, 7500);
}
// ===========================================================================
function checkResetPassword() {
logToConsole(LOG_DEBUG, `[VRR.GUI] Checking password reset with server ...`);
triggerNetworkEvent("vrr.checkResetPassword", resetPassword.emailInput.lines[0]);
sendNetworkEventToServer("vrr.checkResetPassword", resetPassword.emailInput.lines[0]);
}
// ===========================================================================
@@ -154,14 +154,15 @@ function resetPasswordFailed(errorMessage) {
// ===========================================================================
function resetPasswordCodeStep() {
function resetPasswordCodeInputGUI() {
logToConsole(LOG_DEBUG, `[VRR.GUI] Server reports password reset was successful`);
resetPassword.messageLabel.text = "Check your email for a reset code";
resetPassword.messageLabel.text = "Check your email for a verification code";
resetPassword.messageLabel.styles.main.textColour = toColour(180, 32, 32, 255);
resetPassword.emailInput.text = "";
resetPassword.emailInput.placeholder = "Verification Code";
guiSubmitKey = false;
guiSubmitButton = checkResetPassword;
closeAllWindows();
}