Add pos offset for locale chooser
This commit is contained in:
@@ -52,7 +52,13 @@ function closeLocaleChooserGUI() {
|
|||||||
|
|
||||||
// ===========================================================================
|
// ===========================================================================
|
||||||
|
|
||||||
function showLocaleChooserGUI() {
|
function showLocaleChooserGUI(position = toVector2(0, 0)) {
|
||||||
|
if(position.x != 0 && position.y != 0) {
|
||||||
|
localeChooser.window.position = position;
|
||||||
|
} else {
|
||||||
|
localeChooser.window.position = toVector2((getScreenWidth()/2)-(localeChooser.window.size.x/2), getScreenHeight()-100);
|
||||||
|
}
|
||||||
|
|
||||||
//closeAllWindows();
|
//closeAllWindows();
|
||||||
logToConsole(LOG_DEBUG, `[VRR.GUI] Showing locale chooser window`);
|
logToConsole(LOG_DEBUG, `[VRR.GUI] Showing locale chooser window`);
|
||||||
mexui.setInput(true);
|
mexui.setInput(true);
|
||||||
@@ -61,6 +67,16 @@ function showLocaleChooserGUI() {
|
|||||||
|
|
||||||
// ===========================================================================
|
// ===========================================================================
|
||||||
|
|
||||||
|
function toggleLocaleChooserGUI() {
|
||||||
|
if(localeChooser.window.shown) {
|
||||||
|
closeLocaleChooserGUI();
|
||||||
|
} else {
|
||||||
|
showLocaleChooserGUI();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// ===========================================================================
|
||||||
|
|
||||||
function localeChooserSetLocale(localeId) {
|
function localeChooserSetLocale(localeId) {
|
||||||
logToConsole(LOG_DEBUG|LOG_WARN, `[VRR.GUI] Asking server to change locale to ${localeId}`);
|
logToConsole(LOG_DEBUG|LOG_WARN, `[VRR.GUI] Asking server to change locale to ${localeId}`);
|
||||||
sendLocaleSelectToServer(localeId);
|
sendLocaleSelectToServer(localeId);
|
||||||
|
|||||||
Reference in New Issue
Block a user