mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2024-11-26 00:36:25 +00:00
Fix password input types for languages other than english
This commit is contained in:
parent
adc383a8f9
commit
4ea67976b9
@ -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);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user