Compare commits

...

4 Commits

Author SHA1 Message Date
SmhMyHead
574758121a
Merge c54e7e935c into 5d4b805c13 2025-08-09 16:49:21 -05:00
Wlowscha
5d4b805c13
[UI/UX][Bug] Removed extra division by 6 in starter-select-ui-handler.ts (#6245)
Removed division by 6 in starter-select-ui-handler.ts
2025-08-09 15:27:47 -05:00
Lugiad
e862334819
[UI/UX] Summary Move Effect UI adjustments (#6223)
Summary Effect tab UI image adjustments
2025-08-09 15:11:03 +00:00
SmhMyHead
c54e7e935c [UI/UIX] Dex unseen species filter 2025-05-31 04:38:50 +02:00
4 changed files with 36 additions and 7 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 290 B

After

Width:  |  Height:  |  Size: 289 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 283 B

After

Width:  |  Height:  |  Size: 292 B

View File

@ -235,6 +235,9 @@ export class PokedexUiHandler extends MessageUiHandler {
private canShowFormTray: boolean;
private filteredIndices: SpeciesId[];
// Custom tint for unseen species filter
private customTintSeenFilter = false;
constructor() {
super(UiMode.POKEDEX);
}
@ -410,6 +413,11 @@ export class PokedexUiHandler extends MessageUiHandler {
new DropDownLabel(i18next.t("filterBar:hasHiddenAbility"), undefined, DropDownState.ON),
new DropDownLabel(i18next.t("filterBar:noHiddenAbility"), undefined, DropDownState.EXCLUDE),
];
const seenSpeciesLabels = [
new DropDownLabel(i18next.t("filterBar:seenSpecies"), undefined, DropDownState.OFF),
new DropDownLabel(i18next.t("filterBar:isSeen"), undefined, DropDownState.ON),
new DropDownLabel(i18next.t("filterBar:isUnseen"), undefined, DropDownState.EXCLUDE),
];
const eggLabels = [
new DropDownLabel(i18next.t("filterBar:egg"), undefined, DropDownState.OFF),
new DropDownLabel(i18next.t("filterBar:eggPurchasable"), undefined, DropDownState.ON),
@ -423,6 +431,7 @@ export class PokedexUiHandler extends MessageUiHandler {
new DropDownOption("FAVORITE", favoriteLabels),
new DropDownOption("WIN", winLabels),
new DropDownOption("HIDDEN_ABILITY", hiddenAbilityLabels),
new DropDownOption("SEEN_SPECIES", seenSpeciesLabels),
new DropDownOption("EGG", eggLabels),
new DropDownOption("POKERUS", pokerusLabels),
];
@ -792,13 +801,15 @@ export class PokedexUiHandler extends MessageUiHandler {
this.starterSelectMessageBoxContainer.setVisible(!!text?.length);
}
isSeen(species: PokemonSpecies, dexEntry: DexEntry): boolean {
isSeen(species: PokemonSpecies, dexEntry: DexEntry, seenFilter?: boolean): boolean {
if (dexEntry?.seenAttr) {
return true;
}
const starterDexEntry = globalScene.gameData.dexData[this.getStarterSpeciesId(species.speciesId)];
return !!starterDexEntry?.caughtAttr;
if (!seenFilter) {
const starterDexEntry = globalScene.gameData.dexData[this.getStarterSpeciesId(species.speciesId)];
return !!starterDexEntry?.caughtAttr;
}
return false;
}
/**
@ -1617,6 +1628,23 @@ export class PokedexUiHandler extends MessageUiHandler {
}
});
// Seen Filter
const dexEntry = globalScene.gameData.dexData[species.speciesId];
const isItSeen = this.isSeen(species, dexEntry, true);
const fitsSeen = this.filterBar.getVals(DropDownColumn.MISC).some(misc => {
if (misc.val === "SEEN_SPECIES" && misc.state === DropDownState.ON) {
return isItSeen;
}
if (misc.val === "SEEN_SPECIES" && misc.state === DropDownState.EXCLUDE) {
this.customTintSeenFilter = true;
return !isItSeen;
}
if (misc.val === "SEEN_SPECIES" && misc.state === DropDownState.OFF) {
this.customTintSeenFilter = false;
return true;
}
});
// Egg Purchasable Filter
const isEggPurchasable = this.isSameSpeciesEggAvailable(species.speciesId);
const fitsEgg = this.filterBar.getVals(DropDownColumn.MISC).some(misc => {
@ -1658,6 +1686,7 @@ export class PokedexUiHandler extends MessageUiHandler {
fitsFavorite &&
fitsWin &&
fitsHA &&
fitsSeen &&
fitsEgg &&
fitsPokerus
) {
@ -1753,9 +1782,9 @@ export class PokedexUiHandler extends MessageUiHandler {
globalScene.gameData.dexData[this.getStarterSpeciesId(speciesId)].caughtAttr &
data.species.getFullUnlocksData();
if (caughtAttr & data.species.getFullUnlocksData() || globalScene.dexForDevs) {
if ((caughtAttr & data.species.getFullUnlocksData() && !this.customTintSeenFilter) || globalScene.dexForDevs) {
container.icon.clearTint();
} else if (this.isSeen(data.species, dexEntry)) {
} else if (this.isSeen(data.species, dexEntry) || this.customTintSeenFilter) {
container.icon.setTint(0x808080);
} else {
container.icon.setTint(0);

View File

@ -1053,7 +1053,7 @@ export class StarterSelectUiHandler extends MessageUiHandler {
this.moveInfoOverlay = new MoveInfoOverlay({
top: true,
x: 1,
y: globalScene.scaledCanvas.height / 6 - MoveInfoOverlay.getHeight() - 29,
y: globalScene.scaledCanvas.height - MoveInfoOverlay.getHeight() - 29,
});
this.starterSelectContainer.add([