From 872c53437ce131d1038c9f07b384d2f38ef4d659 Mon Sep 17 00:00:00 2001 From: rnicar Date: Wed, 15 May 2024 20:21:19 +0200 Subject: [PATCH] Added ability-passive imgs to summary-ui-handler. Fixed exp bar --- src/loading-scene.ts | 2 ++ src/ui/summary-ui-handler.ts | 6 +++--- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/loading-scene.ts b/src/loading-scene.ts index df7b23fd3..fe96dc6c7 100644 --- a/src/loading-scene.ts +++ b/src/loading-scene.ts @@ -123,6 +123,8 @@ export class LoadingScene extends SceneBase { this.loadImage(`summary_moves_effect_${lang}`, 'ui'); this.loadImage(`summary_profile_${lang}`, 'ui'); this.loadImage(`summary_stats_${lang}`, 'ui'); + this.loadImage(`summary_profile_ability_${lang}`, 'ui'); + this.loadImage(`summary_profile_passive_${lang}`, 'ui'); for (let t = 1; t <= 3; t++){ this.loadImage(`summary_tabs_${t}_${lang}`, 'ui'); } diff --git a/src/ui/summary-ui-handler.ts b/src/ui/summary-ui-handler.ts index 160c2c769..2efaa3458 100644 --- a/src/ui/summary-ui-handler.ts +++ b/src/ui/summary-ui-handler.ts @@ -720,7 +720,7 @@ export default class SummaryUiHandler extends UiHandler { } this.abilityContainer = { - labelImage: this.scene.add.image(0, 0, 'summary_profile_ability'), + labelImage: this.scene.add.image(0, 0, Utils.verifyLang() ? `summary_profile_ability_${i18next.language}`: 'summary_profile_ability'), ability: this.pokemon.getAbility(true), nameText: null, descriptionText: null}; @@ -729,7 +729,7 @@ export default class SummaryUiHandler extends UiHandler { // Only add to the array and set up displaying a passive if it's unlocked if (this.pokemon.hasPassive()) { this.passiveContainer = { - labelImage: this.scene.add.image(0, 0, 'summary_profile_passive'), + labelImage: this.scene.add.image(0, 0, Utils.verifyLang() ? `summary_profile_passive_${i18next.language}`: 'summary_profile_passive'), ability: this.pokemon.getPassiveAbility(), nameText: null, descriptionText: null}; @@ -859,7 +859,7 @@ export default class SummaryUiHandler extends UiHandler { nextLvExpText.setOrigin(1, 0); statsContainer.add(nextLvExpText); - const expOverlay = this.scene.add.image(140, 145, Utils.verifyLang() ? `summary_stats_overlay_exp_${i18next.language}`: 'summary_stats_overlay_exp'); + const expOverlay = this.scene.add.image(140, 145, 'summary_stats_overlay_exp'); expOverlay.setOrigin(0, 0); statsContainer.add(expOverlay);