mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-07-04 15:32:18 +02:00
Merge branch 'beta' into remove-deprecated-test-funcs
This commit is contained in:
commit
14cbd31ec6
9
src/enums/drop-down-column.ts
Normal file
9
src/enums/drop-down-column.ts
Normal file
@ -0,0 +1,9 @@
|
||||
export enum DropDownColumn {
|
||||
GEN,
|
||||
TYPES,
|
||||
BIOME,
|
||||
CAUGHT,
|
||||
UNLOCKS,
|
||||
MISC,
|
||||
SORT
|
||||
}
|
@ -43,14 +43,13 @@ export default class EggCounterContainer extends Phaser.GameObjects.Container {
|
||||
|
||||
this.add(this.eggCountWindow);
|
||||
|
||||
const eggSprite = globalScene.add.sprite(19, 18, "egg", "egg_0");
|
||||
eggSprite.setScale(0.32);
|
||||
const eggSprite = globalScene.add.sprite(19, 18, "egg", "egg_0").setScale(0.32);
|
||||
|
||||
this.eggCountText = addTextObject(28, 13, `${this.eggCount}`, TextStyle.MESSAGE, { fontSize: "66px" });
|
||||
this.eggCountText.setName("text-egg-count");
|
||||
this.eggCountText = addTextObject(28, 13, `${this.eggCount}`, TextStyle.MESSAGE, { fontSize: "66px" }).setName(
|
||||
"text-egg-count",
|
||||
);
|
||||
|
||||
this.add(eggSprite);
|
||||
this.add(this.eggCountText);
|
||||
this.add([eggSprite, this.eggCountText]);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -22,18 +22,12 @@ export default class EvolutionSceneHandler extends MessageUiHandler {
|
||||
const ui = this.getUi();
|
||||
|
||||
this.evolutionContainer = globalScene.add.container(0, -globalScene.game.canvas.height / 6);
|
||||
ui.add(this.evolutionContainer);
|
||||
|
||||
const messageBg = globalScene.add.sprite(0, 0, "bg", globalScene.windowType);
|
||||
messageBg.setOrigin(0, 1);
|
||||
messageBg.setVisible(false);
|
||||
ui.add(messageBg);
|
||||
const messageBg = globalScene.add.sprite(0, 0, "bg", globalScene.windowType).setOrigin(0, 1).setVisible(false);
|
||||
|
||||
this.messageBg = messageBg;
|
||||
|
||||
this.messageContainer = globalScene.add.container(12, -39);
|
||||
this.messageContainer.setVisible(false);
|
||||
ui.add(this.messageContainer);
|
||||
this.messageContainer = globalScene.add.container(12, -39).setVisible(false);
|
||||
|
||||
const message = addTextObject(0, 0, "", TextStyle.MESSAGE, {
|
||||
maxLines: 2,
|
||||
@ -43,6 +37,8 @@ export default class EvolutionSceneHandler extends MessageUiHandler {
|
||||
});
|
||||
this.messageContainer.add(message);
|
||||
|
||||
ui.add([this.evolutionContainer, this.messageBg, this.messageContainer]);
|
||||
|
||||
this.message = message;
|
||||
|
||||
this.initPromptSprite(this.messageContainer);
|
||||
@ -52,10 +48,8 @@ export default class EvolutionSceneHandler extends MessageUiHandler {
|
||||
super.show(_args);
|
||||
|
||||
globalScene.ui.bringToTop(this.evolutionContainer);
|
||||
globalScene.ui.bringToTop(this.messageBg);
|
||||
globalScene.ui.bringToTop(this.messageContainer);
|
||||
this.messageBg.setVisible(true);
|
||||
this.messageContainer.setVisible(true);
|
||||
globalScene.ui.bringToTop(this.messageBg.setVisible(true));
|
||||
globalScene.ui.bringToTop(this.messageContainer.setVisible(true));
|
||||
|
||||
return true;
|
||||
}
|
||||
|
@ -5,16 +5,7 @@ import { addTextObject, getTextColor, TextStyle } from "./text";
|
||||
import type { UiTheme } from "#enums/ui-theme";
|
||||
import { addWindow, WindowVariant } from "./ui-theme";
|
||||
import { globalScene } from "#app/global-scene";
|
||||
|
||||
export enum DropDownColumn {
|
||||
GEN,
|
||||
TYPES,
|
||||
BIOME,
|
||||
CAUGHT,
|
||||
UNLOCKS,
|
||||
MISC,
|
||||
SORT,
|
||||
}
|
||||
import type { DropDownColumn } from "#enums/drop-down-column";
|
||||
|
||||
export class FilterBar extends Phaser.GameObjects.Container {
|
||||
private window: Phaser.GameObjects.NineSlice;
|
||||
@ -49,13 +40,9 @@ export class FilterBar extends Phaser.GameObjects.Container {
|
||||
this.cursorOffset = cursorOffset;
|
||||
|
||||
this.window = addWindow(0, 0, width, height, false, false, undefined, undefined, WindowVariant.THIN);
|
||||
this.add(this.window);
|
||||
|
||||
this.cursorObj = globalScene.add.image(1, 1, "cursor");
|
||||
this.cursorObj.setScale(0.5);
|
||||
this.cursorObj.setVisible(false);
|
||||
this.cursorObj.setOrigin(0, 0);
|
||||
this.add(this.cursorObj);
|
||||
this.cursorObj = globalScene.add.image(1, 1, "cursor").setScale(0.5).setVisible(false).setOrigin(0);
|
||||
this.add([this.window, this.cursorObj]);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -23,7 +23,8 @@ import type { Species } from "#enums/species";
|
||||
import { Button } from "#enums/buttons";
|
||||
import { DropDown, DropDownLabel, DropDownOption, DropDownState, DropDownType, SortCriteria } from "#app/ui/dropdown";
|
||||
import { PokedexMonContainer } from "#app/ui/pokedex-mon-container";
|
||||
import { DropDownColumn, FilterBar } from "#app/ui/filter-bar";
|
||||
import { FilterBar } from "#app/ui/filter-bar";
|
||||
import { DropDownColumn } from "#enums/drop-down-column";
|
||||
import { ScrollBar } from "#app/ui/scroll-bar";
|
||||
import { Abilities } from "#enums/abilities";
|
||||
import {
|
||||
|
@ -53,7 +53,8 @@ import { Button } from "#enums/buttons";
|
||||
import { EggSourceType } from "#enums/egg-source-types";
|
||||
import { DropDown, DropDownLabel, DropDownOption, DropDownState, DropDownType, SortCriteria } from "#app/ui/dropdown";
|
||||
import { StarterContainer } from "#app/ui/starter-container";
|
||||
import { DropDownColumn, FilterBar } from "#app/ui/filter-bar";
|
||||
import { FilterBar } from "#app/ui/filter-bar";
|
||||
import { DropDownColumn } from "#enums/drop-down-column";
|
||||
import { ScrollBar } from "#app/ui/scroll-bar";
|
||||
import { SelectChallengePhase } from "#app/phases/select-challenge-phase";
|
||||
import { EncounterPhase } from "#app/phases/encounter-phase";
|
||||
|
@ -8,7 +8,7 @@ import { Abilities } from "#enums/abilities";
|
||||
import { Species } from "#enums/species";
|
||||
import { allSpecies, getPokemonSpecies, type PokemonForm } from "#app/data/pokemon-species";
|
||||
import { Button } from "#enums/buttons";
|
||||
import { DropDownColumn } from "#app/ui/filter-bar";
|
||||
import { DropDownColumn } from "#enums/drop-down-column";
|
||||
import type PokemonSpecies from "#app/data/pokemon-species";
|
||||
import { PokemonType } from "#enums/pokemon-type";
|
||||
import { UiMode } from "#enums/ui-mode";
|
||||
|
Loading…
Reference in New Issue
Block a user