Variant Label Color Change [QOL] (#2198)

* Test changes to change variant label color based on Tint

* Implementedlabel color change on pokemon change
This commit is contained in:
Teju Rajbabu 2024-06-14 11:01:11 -04:00 committed by GitHub
parent 65f4933a1d
commit 90d0a17b45
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 13 additions and 1 deletions

View File

@ -1446,6 +1446,11 @@ export default class StarterSelectUiHandler extends MessageUiHandler {
}
} while (newVariant !== props.variant);
this.setSpeciesDetails(this.lastSpecies, undefined, undefined, undefined, newVariant, undefined, undefined);
// Cycle tint based on current sprite tint
const tint = getVariantTint(newVariant);
this.variantLabel.setTint(tint);
success = true;
}
break;
@ -1715,8 +1720,15 @@ export default class StarterSelectUiHandler extends MessageUiHandler {
this.cursorObj.setPosition(150 + 18 * (cursor % 9), 10 + 18 * Math.floor(cursor / 9));
this.setSpecies(this.genSpecies[this.getGenCursorWithScroll()][cursor]);
const species = this.genSpecies[this.getGenCursorWithScroll()][cursor];
const defaultDexAttr = this.scene.gameData.getSpeciesDefaultDexAttr(species, false, true);
const defaultProps = this.scene.gameData.getSpeciesDexAttrProps(species, defaultDexAttr);
const variant = defaultProps.variant;
const tint = getVariantTint(variant);
this.variantLabel.setTint(tint);
this.setSpecies(species);
this.updateInstructions();
}