mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-07-26 02:02:20 +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;
|
const handler = ui.getHandler() as AwaitableUiHandler;
|
||||||
handler.tutorialActive = true;
|
handler.tutorialActive = true;
|
||||||
// Switch to the dialog test window
|
// 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();
|
ui.revertMode();
|
||||||
this.onChange();
|
this.onChange();
|
||||||
},
|
},
|
||||||
|
@ -169,7 +169,8 @@ export default class PokedexScanUiHandler extends FormModalUiHandler {
|
|||||||
this.submitAction = (_) => {
|
this.submitAction = (_) => {
|
||||||
if (ui.getMode() === Mode.POKEDEX_SCAN) {
|
if (ui.getMode() === Mode.POKEDEX_SCAN) {
|
||||||
this.sanitizeInputs();
|
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);
|
config.buttonActions[0](sanitizedName);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user