From 3229cfd0e85ae20b1e43e633d84b256445b80c40 Mon Sep 17 00:00:00 2001 From: Vortrex <3858226+VortrexFTW@users.noreply.github.com> Date: Sun, 15 May 2022 04:15:39 -0500 Subject: [PATCH] Show locale chooser when certain GUI is active --- scripts/client/gui/changepass.js | 2 ++ scripts/client/gui/charselect.js | 2 ++ scripts/client/gui/login.js | 2 ++ scripts/client/gui/newchar.js | 4 +++- scripts/client/gui/register.js | 3 +++ 5 files changed, 12 insertions(+), 1 deletion(-) diff --git a/scripts/client/gui/changepass.js b/scripts/client/gui/changepass.js index 7a7ba834..2927eea1 100644 --- a/scripts/client/gui/changepass.js +++ b/scripts/client/gui/changepass.js @@ -141,6 +141,8 @@ function showChangePasswordGUI() { passwordChange.window.shown = true; mexui.focusedControl = passwordChange.passwordInput; guiSubmitKey = checkChangePassword; + + showLocaleChooserGUI(); } // =========================================================================== diff --git a/scripts/client/gui/charselect.js b/scripts/client/gui/charselect.js index aaf8a516..d4b8f7ca 100644 --- a/scripts/client/gui/charselect.js +++ b/scripts/client/gui/charselect.js @@ -170,6 +170,8 @@ function showCharacterSelectGUI(firstName, lastName, cash, clan, lastPlayed, ski guiSubmitKey = selectThisCharacter; guiLeftKey = selectPreviousCharacter; guiRightKey = selectNextCharacter; + + showLocaleChooserGUI(); } // =========================================================================== diff --git a/scripts/client/gui/login.js b/scripts/client/gui/login.js index ab68c6ee..98994b71 100644 --- a/scripts/client/gui/login.js +++ b/scripts/client/gui/login.js @@ -156,6 +156,8 @@ function showLoginGUI() { login.window.shown = true; mexui.focusedControl = login.passwordInput; guiSubmitKey = checkLogin; + + showLocaleChooserGUI(); //showSmallGameMessage(`If you don't have a mouse cursor, press ${toUpperCase(getKeyNameFromId(disableGUIKey))} to disable GUI`, COLOUR_WHITE, 7500); } diff --git a/scripts/client/gui/newchar.js b/scripts/client/gui/newchar.js index 945c5600..e823e495 100644 --- a/scripts/client/gui/newchar.js +++ b/scripts/client/gui/newchar.js @@ -12,7 +12,7 @@ let newCharacter = { messageLabel: null, firstNameInput: null, lastNameInput: null, - createButton: null, + createCharacterButton: null, mainLogoImage: null, }; @@ -159,6 +159,8 @@ function showNewCharacterGUI() { newCharacter.window.shown = true; mexui.focusedInput = newCharacter.firstNameInput; guiSubmitButton = checkNewCharacter; + + showLocaleChooserGUI(); } // =========================================================================== \ No newline at end of file diff --git a/scripts/client/gui/register.js b/scripts/client/gui/register.js index c80978aa..ffa20936 100644 --- a/scripts/client/gui/register.js +++ b/scripts/client/gui/register.js @@ -161,6 +161,9 @@ function showRegistrationGUI() { register.window.shown = true; mexui.focusedControl = register.passwordInput; guiSubmitKey = checkRegistration; + + showLocaleChooserGUI(); + //showSmallGameMessage(`If you don't have a mouse cursor, press ${toUpperCase(getKeyNameFromId(disableGUIKey))} to disable GUI`, COLOUR_WHITE, 7500); }