Fixed bug of overlapping labels in text filters

This commit is contained in:
Wlowscha 2025-01-06 22:36:27 +01:00
parent 8d27907336
commit 125b8ba3df
No known key found for this signature in database
GPG Key ID: 3C8F1AD330565D04

View File

@ -103,7 +103,6 @@ export default class PokedexScanUiHandler extends FormModalUiHandler {
// args[2] is an index of FilterTextRow
//TODO: This logic is probably way more complex than we need, and actually messes things up for moves and abilities with a space like "Leech Seed"
show(args: any[]): boolean {
this.row = args[2];
const ui = this.getUi();
@ -179,4 +178,13 @@ export default class PokedexScanUiHandler extends FormModalUiHandler {
}
return false;
}
clear(): void {
super.clear();
// Clearing the labels so they don't appear again and overlap
this.formLabels.forEach(label => {
label.destroy();
});
}
}