mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-03-06 18:09:10 +00:00
[Bug][UI/UX] Never select invisible containers in Pokédex (#5449)
This commit is contained in:
parent
9b2f649078
commit
118bdcc49e
@ -986,7 +986,7 @@ export default class PokedexUiHandler extends MessageUiHandler {
|
|||||||
this.updateScroll();
|
this.updateScroll();
|
||||||
const proportion = this.filterBarCursor / Math.max(1, this.filterBar.numFilters - 1);
|
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));
|
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;
|
success = true;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
@ -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();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user