diff --git a/public/images/ui/windows/abyss_panel.png b/public/images/ui/windows/abyss_panel.png new file mode 100644 index 00000000000..30c2918e5f6 Binary files /dev/null and b/public/images/ui/windows/abyss_panel.png differ diff --git a/public/images/ui/windows/beach_panel.png b/public/images/ui/windows/beach_panel.png new file mode 100644 index 00000000000..eccdac1779f Binary files /dev/null and b/public/images/ui/windows/beach_panel.png differ diff --git a/public/images/ui/windows/end_panel.png b/public/images/ui/windows/end_panel.png new file mode 100644 index 00000000000..96269ae6cf6 Binary files /dev/null and b/public/images/ui/windows/end_panel.png differ diff --git a/public/images/ui/windows/sea_panel.png b/public/images/ui/windows/sea_panel.png new file mode 100644 index 00000000000..f81e6c59fe6 Binary files /dev/null and b/public/images/ui/windows/sea_panel.png differ diff --git a/public/images/ui/windows/slum_panel.png b/public/images/ui/windows/slum_panel.png new file mode 100644 index 00000000000..14e1e099b50 Binary files /dev/null and b/public/images/ui/windows/slum_panel.png differ diff --git a/public/images/ui/windows/space_panel.png b/public/images/ui/windows/space_panel.png new file mode 100644 index 00000000000..65a0c6bc238 Binary files /dev/null and b/public/images/ui/windows/space_panel.png differ diff --git a/public/images/ui/windows/town_panel.png b/public/images/ui/windows/town_panel.png new file mode 100644 index 00000000000..c8b45a0edf9 Binary files /dev/null and b/public/images/ui/windows/town_panel.png differ diff --git a/src/loading-scene.ts b/src/loading-scene.ts index a684713acfd..076b5c3a3b6 100644 --- a/src/loading-scene.ts +++ b/src/loading-scene.ts @@ -23,7 +23,7 @@ import { initVouchers } from "./system/voucher"; import { Biome } from "#enums/biome"; import { TrainerType } from "#enums/trainer-type"; -const biomePanelIDs: string[] = [ +export const biomePanelIDs: string[] = [ "town", "plains", "grass", @@ -76,6 +76,43 @@ const biomePanelIDs: string[] = [ "", "end" ] +export const allpanels: string[] = [ + "abyss", + //"badlands", + "beach", + //"cave", + //"construction_site", + //"desert", + //"dojo", + "end", + //"factory", + //"fairy_cave", + //"forest", + //"grass", + //"graveyard", + //"ice_cave", + //"island", + //"jungle", + //"laboratory", + //"lake", + //"meadow", + //"metropolis", + //"mountain", + //"plains", + //"power_plant", + //"ruins", + "sea", + //"seabed", + "slum", + //"snowy_forest", + "space", + //"swamp", + //"tall_grass", + //"temple", + "town", + "volcano", + "wasteland" +] export class LoadingScene extends SceneBase { readonly LOAD_EVENTS = Phaser.Loader.Events; @@ -114,7 +151,7 @@ export class LoadingScene extends SceneBase { //this.loadImage(`construction_site_panel`, "ui/windows"); //this.loadImage(`desert_panel`, "ui/windows"); //this.loadImage(`dojo_panel`, "ui/windows"); - //this.loadImage(`end_panel`, "ui/windows"); +// this.loadImage(`end_panel`, "ui/windows"); //this.loadImage(`factory_panel`, "ui/windows"); //this.loadImage(`fairy_cave_panel`, "ui/windows"); //this.loadImage(`forest_panel`, "ui/windows"); @@ -131,17 +168,20 @@ export class LoadingScene extends SceneBase { //this.loadImage(`plains_panel`, "ui/windows"); //this.loadImage(`power_plant_panel`, "ui/windows"); //this.loadImage(`ruins_panel`, "ui/windows"); - //this.loadImage(`sea_panel`, "ui/windows"); +// this.loadImage(`sea_panel`, "ui/windows"); //this.loadImage(`seabed_panel`, "ui/windows"); //this.loadImage(`slum_panel`, "ui/windows"); //this.loadImage(`snowy_forest_panel`, "ui/windows"); - //this.loadImage(`space_panel`, "ui/windows"); +// this.loadImage(`space_panel`, "ui/windows"); //this.loadImage(`swamp_panel`, "ui/windows"); //this.loadImage(`tall_grass_panel`, "ui/windows"); //this.loadImage(`temple_panel`, "ui/windows"); //this.loadImage(`town_panel`, "ui/windows"); - //this.loadImage(`volcano_panel`, "ui/windows"); - //this.loadImage(`wasteland_panel`, "ui/windows"); +// this.loadImage(`volcano_panel`, "ui/windows"); +// this.loadImage(`wasteland_panel`, "ui/windows"); + for (var i = 0; i < allpanels.length; i++) { + this.loadImage(`${allpanels[i]}_panel`, "ui/windows"); + } this.loadAtlas("namebox", "ui"); this.loadImage("pbinfo_player", "ui"); this.loadImage("pbinfo_player_stats", "ui"); diff --git a/src/ui/save-slot-select-ui-handler.ts b/src/ui/save-slot-select-ui-handler.ts index fa1dced0035..15d49126741 100644 --- a/src/ui/save-slot-select-ui-handler.ts +++ b/src/ui/save-slot-select-ui-handler.ts @@ -12,6 +12,7 @@ import { Mode } from "./ui"; import { addWindow } from "./ui-theme"; import * as LoggerTools from "../logger" import { loggedInUser } from "#app/account.js"; +import { allpanels, biomePanelIDs } from "../loading-scene" const sessionSlotCount = 5; @@ -308,14 +309,13 @@ class SessionSlot extends Phaser.GameObjects.Container { const slotWindow = addWindow(this.scene, 0, 0, 304, 52); this.add(slotWindow); - if (this.slotId == 0) { - //this.backer = this.scene.add.image(0, 0, `sea_panel`) - //this.backer.setOrigin(0.5, 0.5) - //this.backer.setScale(304/909, 52/155) - //this.backer.setPosition(102*1.5 - 1, 26) - //this.backer.setSize(304, 52) - //this.add(this.backer) - } + this.backer = this.scene.add.image(0, 0, `end_panel`) + this.backer.setOrigin(0.5, 0.5) + this.backer.setScale(304/909, 52/155) + this.backer.setPosition(102*1.5 - 1, 26) + this.backer.setSize(304, 52) + this.backer.setVisible(false) + this.add(this.backer) this.loadingLabel = addTextObject(this.scene, 152, 26, i18next.t("saveSlotSelectUiHandler:loading"), TextStyle.WINDOW); this.loadingLabel.setOrigin(0.5, 0.5); @@ -339,6 +339,13 @@ class SessionSlot extends Phaser.GameObjects.Container { const playTimeLabel = addTextObject(this.scene, 8, 33, Utils.getPlayTimeString(data.playTime), TextStyle.WINDOW); this.add(playTimeLabel); + console.log(biomePanelIDs[data.arena.biome]) + + if (allpanels.includes(biomePanelIDs[data.arena.biome])) { + this.backer.setTexture(`${biomePanelIDs[data.arena.biome]}_panel`) + this.backer.setVisible(true) + } + const pokemonIconsContainer = this.scene.add.container(144, 4); data.party.forEach((p: PokemonData, i: integer) => { const iconContainer = this.scene.add.container(26 * i, 0);