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 login = {
function initLoginGUI() {
logToConsole(LOG_DEBUG, `[VRR.GUI] Creating login GUI ...`);
login.window = mexui.window(game.width/2-150, game.height/2-129, 300, 258, 'LOGIN', {
login.window = mexui.window(game.width/2-150, game.height/2-130, 300, 260, 'LOGIN', {
main: {
backgroundColour: toColour(secondaryColour[0], secondaryColour[1], secondaryColour[2], windowAlpha),
transitionTime: 500,
@@ -42,7 +42,7 @@ function initLoginGUI() {
login.window.titleBarIconSize = toVector2(0,0);
login.window.titleBarHeight = 0;
login.logoImage = login.window.image(100, 20, 100, 100, mainLogoPath, {
login.logoImage = login.window.image(85, -10, 140, 140, mainLogoPath, {
focused: {
borderColour: toColour(0, 0, 0, 0),
},
@@ -96,7 +96,7 @@ function initLoginGUI() {
},
}, checkLogin);
login.forgotPasswordButton = login.window.button(200, 240, 60, 15, 'RESET PASS', {
login.forgotPasswordButton = login.window.button(200, 240, 80, 15, 'RESET PASS', {
main: {
backgroundColour: toColour(primaryColour[0], primaryColour[1], primaryColour[2], buttonAlpha),
textColour: toColour(0, 0, 0, 255),
@@ -109,11 +109,11 @@ function initLoginGUI() {
},
}, switchToPasswordResetGUI);
login.resetPasswordLabel = login.window.text(20, 140, 60, 15, 'Forgot your password?', {
login.resetPasswordLabel = login.window.text(125, 240, 60, 15, 'Forgot your password?', {
main: {
textSize: 8.0,
textAlign: 1.0,
textColour: toColour(200, 200, 200, 255),
textColour: toColour(180, 180, 180, 255),
textFont: robotoFont,
},
focused: {
@@ -134,14 +134,14 @@ function showLoginGUI() {
login.window.shown = true;
mexui.focusedControl = login.passwordInput;
guiSubmitKey = checkLogin;
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 checkLogin() {
logToConsole(LOG_DEBUG, `[VRR.GUI] Checking login with server ...`);
triggerNetworkEvent("vrr.checkLogin", login.passwordInput.lines[0]);
sendNetworkEventToServer("vrr.checkLogin", login.passwordInput.lines[0]);
}
// ===========================================================================

View File

@@ -26,17 +26,19 @@ function initNewCharacterGUI() {
backgroundColour: toColour(secondaryColour[0], secondaryColour[1], secondaryColour[2], windowAlpha),
transitionTime: 500,
},
title: {
textSize: 0.0,
textColour: toColour(0, 0, 0, 0),
},
icon: {
textSize: 0.0,
textColour: toColour(0, 0, 0, 0),
},
title: {
textSize: 0.0,
textColour: toColour(0, 0, 0, 0),
backgroundColour: toColour(primaryColour[0], primaryColour[1], primaryColour[2], windowTitleAlpha),
},
icon: {
textSize: 0.0,
textColour: toColour(0, 0, 0, 0),
backgroundColour: toColour(primaryColour[0], primaryColour[1], primaryColour[2], windowTitleAlpha),
}
});
newCharacter.window.titleBarIconSize = toVector2(0,0);
newCharacter.window.titleBarHeight = 0;
//newCharacter.window.titleBarHeight = 0;
newCharacter.mainLogoImage = newCharacter.window.image(115, 10, 65, 65, mainLogoPath, {
focused: {
@@ -141,7 +143,7 @@ function checkNewCharacter() {
return false;
}
triggerNetworkEvent("vrr.checkNewCharacter",
sendNetworkEventToServer("vrr.checkNewCharacter",
newCharacter.firstNameInput.lines[0],
newCharacter.lastNameInput.lines[0],
);

View File

@@ -21,7 +21,7 @@ let register = {
function initRegisterGUI() {
logToConsole(LOG_DEBUG, `[VRR.GUI] Creating register GUI ...`);
register.window = mexui.window(game.width/2-130, game.height/2-125, 300, 250, 'Register', {
register.window = mexui.window(game.width/2-150, game.height/2-150, 300, 300, 'Register', {
main: {
backgroundColour: toColour(secondaryColour[0], secondaryColour[1], secondaryColour[2], windowAlpha),
transitionTime: 500,
@@ -40,13 +40,13 @@ function initRegisterGUI() {
register.window.titleBarIconSize = toVector2(0,0);
register.window.titleBarHeight = 0;
register.window.image(115, 10, 65, 65, mainLogoPath, {
register.window.image(85, -10, 140, 140, mainLogoPath, {
focused: {
borderColour: toColour(0, 0, 0, 0),
},
});
register.messageLabel = register.window.text(20, 75, 260, 20, 'Create an account', {
register.messageLabel = register.window.text(20, 125, 260, 20, 'Create an account', {
main: {
textSize: 10.0,
textAlign: 0.5,
@@ -58,7 +58,7 @@ function initRegisterGUI() {
},
});
register.passwordInput = register.window.textInput(20, 100, 260, 25, '', {
register.passwordInput = register.window.textInput(20, 150, 260, 25, '', {
main: {
backgroundColour: toColour(0, 0, 0, 120),
textColour: toColour(200, 200, 200, 255),
@@ -78,7 +78,7 @@ function initRegisterGUI() {
register.passwordInput.masked = true;
register.passwordInput.placeholder = "Password";
register.confirmPasswordInput = register.window.textInput(20, 130, 260, 25, '', {
register.confirmPasswordInput = register.window.textInput(20, 180, 260, 25, '', {
main: {
backgroundColour: toColour(0, 0, 0, 120),
textColour: toColour(200, 200, 200, 255),
@@ -98,7 +98,7 @@ function initRegisterGUI() {
register.confirmPasswordInput.masked = true;
register.confirmPasswordInput.placeholder = "Confirm password";
register.emailInput = register.window.textInput(20, 160, 260, 25, '', {
register.emailInput = register.window.textInput(20, 210, 260, 25, '', {
main: {
backgroundColour: toColour(0, 0, 0, 120),
textColour: toColour(200, 200, 200, 255),
@@ -117,7 +117,7 @@ function initRegisterGUI() {
});
register.emailInput.placeholder = "Email";
register.registerButton = register.window.button(20, 195, 260, 30, 'CREATE ACCOUNT', {
register.registerButton = register.window.button(20, 245, 260, 30, 'CREATE ACCOUNT', {
main: {
backgroundColour: toColour(primaryColour[0], primaryColour[1], primaryColour[2], buttonAlpha),
textColour: toColour(255, 255, 255, 255),
@@ -147,7 +147,7 @@ function registrationFailed(errorMessage) {
function checkRegistration() {
logToConsole(LOG_DEBUG, `[VRR.GUI] Checking registration with server ...`);
triggerNetworkEvent("vrr.checkRegistration", register.passwordInput.lines[0], register.confirmPasswordInput.lines[0], register.emailInput.lines[0]);
sendNetworkEventToServer("vrr.checkRegistration", register.passwordInput.lines[0], register.confirmPasswordInput.lines[0], register.emailInput.lines[0]);
}
// ===========================================================================
@@ -160,7 +160,7 @@ function showRegistrationGUI() {
register.window.shown = true;
mexui.focusedControl = register.passwordInput;
guiSubmitKey = checkRegistration;
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);
}
// ===========================================================================

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();
}