From d4147d3b490a73e6df3fe5a3254d86e3f3f7a5fd Mon Sep 17 00:00:00 2001 From: Wlowscha <54003515+Wlowscha@users.noreply.github.com> Date: Sat, 1 Mar 2025 00:09:04 +0100 Subject: [PATCH] =?UTF-8?q?Setting=20cursor=20correctly=20when=20going=20d?= =?UTF-8?q?own=20from=20filter=20bar=20and=20only=20one=20Pok=C3=A9mon=20i?= =?UTF-8?q?s=20available?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/ui/pokedex-ui-handler.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ui/pokedex-ui-handler.ts b/src/ui/pokedex-ui-handler.ts index 44ea3b46804..02c19f11813 100644 --- a/src/ui/pokedex-ui-handler.ts +++ b/src/ui/pokedex-ui-handler.ts @@ -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;