mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-07-25 01:32:21 +02:00
Preventing filter texts from showing gibberish
This commit is contained in:
parent
2730a36d00
commit
fa5232a704
@ -133,7 +133,7 @@ export class FilterText extends Phaser.GameObjects.Container {
|
||||
const handler = ui.getHandler() as AwaitableUiHandler;
|
||||
handler.tutorialActive = true;
|
||||
// Switch to the dialog test window
|
||||
this.selections[index].setText(String(i18next.t(dialogueName)));
|
||||
this.selections[index].setText( dialogueName === "" ? this.defaultText : String(i18next.t(dialogueName)));
|
||||
ui.revertMode();
|
||||
this.onChange();
|
||||
},
|
||||
|
@ -169,7 +169,8 @@ export default class PokedexScanUiHandler extends FormModalUiHandler {
|
||||
this.submitAction = (_) => {
|
||||
if (ui.getMode() === Mode.POKEDEX_SCAN) {
|
||||
this.sanitizeInputs();
|
||||
const sanitizedName = btoa(unescape(encodeURIComponent(this.inputs[0].text)));
|
||||
const outputName = this.reducedKeys.includes(this.inputs[0].text) ? this.inputs[0].text : "";
|
||||
const sanitizedName = btoa(unescape(encodeURIComponent(outputName)));
|
||||
config.buttonActions[0](sanitizedName);
|
||||
return true;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user