Change netevent and const prefix

This commit is contained in:
Vortrex
2022-06-30 18:29:17 -05:00
parent 2f7f3a1b00
commit cb86419f2b
20 changed files with 485 additions and 485 deletions

View File

@@ -20,7 +20,7 @@ let newCharacter = {
function initNewCharacterGUI() {
logToConsole(LOG_DEBUG, `[VRR.GUI] Creating new character GUI ...`);
newCharacter.window = mexui.window(getScreenWidth()/2-130, getScreenHeight()/2-115, 300, 230, 'NEW CHARACTER', {
newCharacter.window = mexui.window(getScreenWidth() / 2 - 130, getScreenHeight() / 2 - 115, 300, 230, 'NEW CHARACTER', {
main: {
backgroundColour: toColour(secondaryColour[0], secondaryColour[1], secondaryColour[2], windowAlpha),
transitionTime: 500,
@@ -122,7 +122,7 @@ function newCharacterFailed(errorMessage) {
newCharacter.firstNameInput.text = "";
newCharacter.lastNameInput.text = "";
if(!newCharacter.window.shown) {
if (!newCharacter.window.shown) {
closeAllWindows();
setChatWindowEnabled(false);
mexui.setInput(true);
@@ -135,15 +135,15 @@ function newCharacterFailed(errorMessage) {
function checkNewCharacter() {
logToConsole(LOG_DEBUG, `[VRR.GUI] Checking new character with server ...`);
if(newCharacter.firstNameInput.lines[0].length < 2) {
if (newCharacter.firstNameInput.lines[0].length < 2) {
return false;
}
if(newCharacter.lastNameInput.lines[0].length < 2) {
if (newCharacter.lastNameInput.lines[0].length < 2) {
return false;
}
sendNetworkEventToServer("vrr.checkNewCharacter",
sendNetworkEventToServer("agrp.checkNewCharacter",
newCharacter.firstNameInput.lines[0],
newCharacter.lastNameInput.lines[0],
);
@@ -160,7 +160,7 @@ function showNewCharacterGUI() {
mexui.focusedInput = newCharacter.firstNameInput;
guiSubmitKey = checkNewCharacter;
showLocaleChooserGUI(new Vec2(getScreenWidth()/2-(localeChooser.window.size.x/2), newCharacter.window.position.y+newCharacter.window.size.y+20));
showLocaleChooserGUI(new Vec2(getScreenWidth() / 2 - (localeChooser.window.size.x / 2), newCharacter.window.position.y + newCharacter.window.size.y + 20));
}
// ===========================================================================