Add titlebar to newchar GUI + disable titlebar on others

This commit is contained in:
Vortrex
2022-05-08 06:46:37 -05:00
parent 85638b674a
commit ff769f8632
4 changed files with 11 additions and 8 deletions

View File

@@ -38,6 +38,7 @@ function initChangePasswordGUI() {
}); });
passwordChange.window.titleBarIconSize = toVector2(0,0); passwordChange.window.titleBarIconSize = toVector2(0,0);
passwordChange.window.titleBarHeight = 0; passwordChange.window.titleBarHeight = 0;
passwordChange.window.titleBarShown = false;
passwordChange.window.image(85, -10, 140, 140, mainLogoPath, { passwordChange.window.image(85, -10, 140, 140, mainLogoPath, {
focused: { focused: {

View File

@@ -62,6 +62,7 @@ function initLoginGUI() {
}); });
login.window.titleBarIconSize = toVector2(0,0); login.window.titleBarIconSize = toVector2(0,0);
login.window.titleBarHeight = 0; login.window.titleBarHeight = 0;
login.window.titleBarShown = false;
login.logoImage = login.window.image(100, 20, 100, 100, mainLogoPath, { login.logoImage = login.window.image(100, 20, 100, 100, mainLogoPath, {
focused: { focused: {

View File

@@ -9,10 +9,9 @@
let newCharacter = { let newCharacter = {
window: null, window: null,
messageLabel: null,
firstNameInput: null, firstNameInput: null,
lastNameInput: null, lastNameInput: null,
skinDropDown: null,
spawnAreaDropDown: null,
createButton: null, createButton: null,
mainLogoImage: null, mainLogoImage: null,
}; };
@@ -21,13 +20,14 @@ let newCharacter = {
function initNewCharacterGUI() { function initNewCharacterGUI() {
logToConsole(LOG_DEBUG, `[VRR.GUI] Creating new character GUI ...`); logToConsole(LOG_DEBUG, `[VRR.GUI] Creating new character GUI ...`);
newCharacter.window = mexui.window(game.width/2-130, game.height/2-115, 300, 230, 'New Character', { newCharacter.window = mexui.window(game.width/2-130, game.height/2-115, 300, 230, 'NEW CHARACTER', {
main: { main: {
backgroundColour: toColour(secondaryColour[0], secondaryColour[1], secondaryColour[2], windowAlpha), backgroundColour: toColour(secondaryColour[0], secondaryColour[1], secondaryColour[2], windowAlpha),
transitionTime: 500, transitionTime: 500,
}, },
title: { title: {
textSize: 0.0, textSize: 12.0,
textFont: mainFont,
textColour: toColour(0, 0, 0, 0), textColour: toColour(0, 0, 0, 0),
backgroundColour: toColour(primaryColour[0], primaryColour[1], primaryColour[2], windowTitleAlpha), backgroundColour: toColour(primaryColour[0], primaryColour[1], primaryColour[2], windowTitleAlpha),
}, },
@@ -37,8 +37,10 @@ function initNewCharacterGUI() {
backgroundColour: toColour(primaryColour[0], primaryColour[1], primaryColour[2], windowTitleAlpha), backgroundColour: toColour(primaryColour[0], primaryColour[1], primaryColour[2], windowTitleAlpha),
} }
}); });
newCharacter.window.titleBarIconSize = toVector2(0,0); newCharacter.window.titleBarIconSize = toVector2(0, 0);
newCharacter.window.titleBarHeight = 0; newCharacter.window.titleBarIconShown = false;
newCharacter.window.titleBarShown = false;
newCharacter.window.titleBarHeight = 30;
newCharacter.mainLogoImage = newCharacter.window.image(80, 20, 80, 80, mainLogoPath, { newCharacter.mainLogoImage = newCharacter.window.image(80, 20, 80, 80, mainLogoPath, {
focused: { focused: {
@@ -133,8 +135,6 @@ function newCharacterFailed(errorMessage) {
function checkNewCharacter() { function checkNewCharacter() {
logToConsole(LOG_DEBUG, `[VRR.GUI] Checking new character with server ...`); logToConsole(LOG_DEBUG, `[VRR.GUI] Checking new character with server ...`);
let skinId = false;
if(newCharacter.firstNameInput.lines[0].length < 2) { if(newCharacter.firstNameInput.lines[0].length < 2) {
return false; return false;
} }

View File

@@ -39,6 +39,7 @@ function initRegisterGUI() {
}); });
register.window.titleBarIconSize = toVector2(0,0); register.window.titleBarIconSize = toVector2(0,0);
register.window.titleBarHeight = 0; register.window.titleBarHeight = 0;
register.window.titleBarShown = false;
register.window.image(100, 20, 100, 100, mainLogoPath, { register.window.image(100, 20, 100, 100, mainLogoPath, {
focused: { focused: {