diff --git a/src/battle-scene.ts b/src/battle-scene.ts index 743fe467d1c..f3dc86e57c9 100644 --- a/src/battle-scene.ts +++ b/src/battle-scene.ts @@ -113,6 +113,7 @@ export default class BattleScene extends SceneBase { public reroll: boolean = false; public showMovesetFlyout: boolean = true; public showTeams: boolean = true; + public showTeamSprites: boolean = false; public showArenaFlyout: boolean = true; public showTimeOfDayWidget: boolean = true; public timeOfDayAnimation: EaseType = EaseType.NONE; diff --git a/src/field/pokemon.ts b/src/field/pokemon.ts index cfae5072237..a24a3263ec8 100644 --- a/src/field/pokemon.ts +++ b/src/field/pokemon.ts @@ -1685,6 +1685,9 @@ export default abstract class Pokemon extends Phaser.GameObjects.Container { toggleFlyout(visible: boolean): void { this.battleInfo.toggleFlyout(visible); } + toggleTeamTray(visible: boolean): void { + this.battleInfo.toggleTeamTray(visible); + } addExp(exp: integer) { const maxExpLevel = this.scene.getMaxExpLevel(); diff --git a/src/system/settings/settings.ts b/src/system/settings/settings.ts index bf3a5359fff..9dfba300c78 100644 --- a/src/system/settings/settings.ts +++ b/src/system/settings/settings.ts @@ -412,6 +412,26 @@ export const Setting: Array = [ default: 1, type: SettingType.DISPLAY }, + { + key: SettingKeys.Show_Pokemon_Teams, + label: i18next.t("settings:showTeamTray"), + options: [ + { + value: "Off", + label: i18next.t("settings:off") + }, + { + value: "Ball", + label: i18next.t("settings:simple") + }, + { + value: "Sprite", + label: i18next.t("settings:fancy") + } + ], + default: 1, + type: SettingType.DISPLAY + }, { key: SettingKeys.Show_Arena_Flyout, label: i18next.t("settings:showArenaFlyout"), @@ -647,8 +667,8 @@ export function setSetting(scene: BattleScene, setting: string, value: integer): scene.showMovesetFlyout = Setting[index].options[value].value === "On"; break; case SettingKeys.Show_Pokemon_Teams: - // Currently not used - scene.showTeams = Setting[index].options[value].value === "On"; + scene.showTeams = Setting[index].options[value].value !== "Off"; + scene.showTeamSprites = Setting[index].options[value].value === "Sprite"; break; case SettingKeys.Show_Arena_Flyout: scene.showArenaFlyout = Setting[index].options[value].value === "On"; diff --git a/src/ui-inputs.ts b/src/ui-inputs.ts index 9288fd35892..d219f3503d4 100644 --- a/src/ui-inputs.ts +++ b/src/ui-inputs.ts @@ -132,7 +132,7 @@ export class UiInputs { buttonStats(pressed: boolean = true): void { // allow access to Button.STATS as a toggle for other elements for (const t of this.scene.getInfoToggles(true)) { - t.toggleInfo(pressed); + t.toggleInfo(pressed,); } // handle normal pokemon battle ui for (const p of this.scene.getField().filter(p => p?.isActive(true))) { @@ -146,6 +146,12 @@ export class UiInputs { } } + if (this.scene.showTeams) { + for (const p of this.scene.getField().filter(p => p?.isActive(true))) { + p.toggleTeamTray(pressed); + } + } + if (this.scene.showArenaFlyout) { this.scene.ui.processInfoButton(pressed); } diff --git a/src/ui/battle-info.ts b/src/ui/battle-info.ts index 652718342bb..ef675c44298 100644 --- a/src/ui/battle-info.ts +++ b/src/ui/battle-info.ts @@ -888,6 +888,12 @@ export default class BattleInfo extends Phaser.GameObjects.Container { } else { this.updateEffectiveness(this.currentEffectiveness); } + if (!this.override) this.switchIconVisibility(visible); + // this.teamIconOver[ballindex].setAlpha(0.4, 0.4, 0.7, 0.7) + } + toggleTeamTray(visible: boolean): void { + this.pressedShow = visible; + if (!this.override) this.switchIconVisibility(visible); } /**