mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-07-21 15:52:18 +02:00
Pressing B on filter now closes it or resets instead of going to top of starters
This commit is contained in:
parent
7d25fbb4b2
commit
977af14570
@ -889,16 +889,11 @@ export default class PokedexUiHandler extends MessageUiHandler {
|
||||
if (this.filterMode && this.filterBar.openDropDown) {
|
||||
// CANCEL with a filter menu open > close it
|
||||
this.filterBar.toggleDropDown(this.filterBarCursor);
|
||||
|
||||
// if there are possible pokemon go the first one of the list
|
||||
if (numberOfStarters > 0) {
|
||||
this.setFilterMode(false);
|
||||
this.scrollCursor = 0;
|
||||
this.updateScroll();
|
||||
this.setCursor(0);
|
||||
}
|
||||
success = true;
|
||||
|
||||
} else if (this.filterMode && !this.filterBar.getFilter(this.filterBarCursor).hasDefaultValues()) {
|
||||
this.filterBar.resetSelection(this.filterBarCursor);
|
||||
this.updateStarters;
|
||||
success = true;
|
||||
} else if (this.filterTextMode && !(this.filterText.getValue(this.filterTextCursor) === this.filterText.defaultText)) {
|
||||
this.filterText.resetSelection(this.filterTextCursor);
|
||||
success = true;
|
||||
|
Loading…
Reference in New Issue
Block a user