Fix password input types for languages other than english

pull/277/head
Edralo 2024-04-24 13:45:44 +02:00 committed by Samuel H
parent adc383a8f9
commit 4ea67976b9
1 changed files with 2 additions and 1 deletions

View File

@ -5,6 +5,7 @@ import { TextStyle, addTextInputObject, addTextObject } from "./text";
import { WindowVariant, addWindow } from "./ui-theme";
import InputText from "phaser3-rex-plugins/plugins/inputtext";
import * as Utils from "../utils";
import i18next from '../plugins/i18n';
export interface FormModalConfig extends ModalConfig {
errorMessage?: string;
@ -55,7 +56,7 @@ export abstract class FormModalUiHandler extends ModalUiHandler {
const inputBg = addWindow(this.scene, 0, 0, 80, 16, false, false, 0, 0, WindowVariant.XTHIN);
const isPassword = field.includes('Password');
const isPassword = field.includes(i18next.t("menu:password")) || field.includes(i18next.t("menu:confirmPassword"));
const input = addTextInputObject(this.scene, 4, -2, 440, 116, TextStyle.TOOLTIP_CONTENT, { type: isPassword ? 'password' : 'text', maxLength: isPassword ? 64 : 16 });
input.setOrigin(0, 0);