Setting cursor correctly when going down from filter bar and only one Pokémon is available

This commit is contained in:
Wlowscha 2025-03-01 00:09:04 +01:00
parent 4ca572c6c8
commit d4147d3b49
No known key found for this signature in database
GPG Key ID: 3C8F1AD330565D04

View File

@ -986,7 +986,7 @@ export default class PokedexUiHandler extends MessageUiHandler {
this.updateScroll();
const proportion = this.filterBarCursor / Math.max(1, this.filterBar.numFilters - 1);
const targetCol = Math.min(8, proportion < 0.5 ? Math.floor(proportion * 8) : Math.ceil(proportion * 8));
this.setCursor(Math.min(targetCol, numberOfStarters));
this.setCursor(Math.min(targetCol, numberOfStarters - 1));
success = true;
}
break;