mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-07-20 15:22:19 +02:00
Setting cursor correctly when going down from filter bar and only one Pokémon is available
This commit is contained in:
parent
4ca572c6c8
commit
d4147d3b49
@ -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;
|
||||||
|
Loading…
Reference in New Issue
Block a user