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