Looping cursor correctly going down from second-to-last row

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

View File

@ -1108,7 +1108,7 @@ export default class PokedexUiHandler extends MessageUiHandler {
} }
break; break;
case Button.DOWN: case Button.DOWN:
if (currentRow < numOfRows - 1) { // not last row if ((currentRow < numOfRows - 1) && (this.cursor + 9 < this.filteredPokemonData.length)) { // not last row
if (currentRow - this.scrollCursor === 8) { // last row of visible pokemon if (currentRow - this.scrollCursor === 8) { // last row of visible pokemon
this.scrollCursor++; this.scrollCursor++;
this.updateScroll(); this.updateScroll();