Made changed suggested in code review

This commit is contained in:
Jannik Tappert 2024-09-30 21:06:00 +02:00
parent e6cf0c98bd
commit f79a2a9be4

View File

@ -315,7 +315,6 @@ export default class SummaryUiHandler extends UiHandler {
this.candyIcon.setTint(argbFromRgba(Utils.rgbHexToRgba(colorScheme[0])));
this.candyOverlay.setTint(argbFromRgba(Utils.rgbHexToRgba(colorScheme[1])));
this.friendshipOverlay.setTint(argbFromRgba(Utils.rgbHexToRgba(colorScheme[1])));
this.numberText.setText(Utils.padInt(this.pokemon.species.speciesId, 4));
this.numberText.setColor(this.getTextColor(!this.pokemon.isShiny() ? TextStyle.SUMMARY : TextStyle.SUMMARY_GOLD));
@ -371,8 +370,8 @@ export default class SummaryUiHandler extends UiHandler {
this.candyShadow.setCrop(0, 0, 16, candyCropY);
if (this.friendshipShadow.visible) {
this.friendshipShadow.on("pointerover", () => (this.scene as BattleScene).ui.showTooltip("", `${i18next.t("pokemonSummary:friendship")}`, true));
this.friendshipShadow.on("pointerout", () => (this.scene as BattleScene).ui.hideTooltip());
this.friendshipShadow.on("pointerover", () => this.scene.ui.showTooltip("", `${i18next.t("pokemonSummary:friendship")}`, true));
this.friendshipShadow.on("pointerout", () => this.scene.ui.hideTooltip());
}
this.friendshipText.setText(`${this.pokemon?.friendship || "0"} / 255`);