mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-08-09 17:09:26 +02:00
[Refactor] Refactor UI text ts (#5946)
* Add destroy method to pokemon-sprite-sparkle-handler * Move TextStyle to enums, convert into const object * Cleanup text.ts file * Add necessary explicit types for TextStyle let vars * Fix locales submodule commit * Fix merge issue --------- Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com>
This commit is contained in:
parent
ed8858e07d
commit
1b8082a177
10
src/@types/ui.ts
Normal file
10
src/@types/ui.ts
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
import type Phaser from "phaser";
|
||||||
|
import type InputText from "phaser3-rex-plugins/plugins/gameobjects/dom/inputtext/InputText";
|
||||||
|
|
||||||
|
export interface TextStyleOptions {
|
||||||
|
scale: number;
|
||||||
|
styleOptions: Phaser.Types.GameObjects.Text.TextStyle | InputText.IConfig;
|
||||||
|
shadowColor: string;
|
||||||
|
shadowXpos: number;
|
||||||
|
shadowYpos: number;
|
||||||
|
}
|
@ -67,6 +67,7 @@ import { PokemonType } from "#enums/pokemon-type";
|
|||||||
import { ShopCursorTarget } from "#enums/shop-cursor-target";
|
import { ShopCursorTarget } from "#enums/shop-cursor-target";
|
||||||
import { SpeciesId } from "#enums/species-id";
|
import { SpeciesId } from "#enums/species-id";
|
||||||
import { StatusEffect } from "#enums/status-effect";
|
import { StatusEffect } from "#enums/status-effect";
|
||||||
|
import { TextStyle } from "#enums/text-style";
|
||||||
import type { TrainerSlot } from "#enums/trainer-slot";
|
import type { TrainerSlot } from "#enums/trainer-slot";
|
||||||
import { TrainerType } from "#enums/trainer-type";
|
import { TrainerType } from "#enums/trainer-type";
|
||||||
import { TrainerVariant } from "#enums/trainer-variant";
|
import { TrainerVariant } from "#enums/trainer-variant";
|
||||||
@ -132,7 +133,7 @@ import { CharSprite } from "#ui/char-sprite";
|
|||||||
import { PartyExpBar } from "#ui/party-exp-bar";
|
import { PartyExpBar } from "#ui/party-exp-bar";
|
||||||
import { PokeballTray } from "#ui/pokeball-tray";
|
import { PokeballTray } from "#ui/pokeball-tray";
|
||||||
import { PokemonInfoContainer } from "#ui/pokemon-info-container";
|
import { PokemonInfoContainer } from "#ui/pokemon-info-container";
|
||||||
import { addTextObject, getTextColor, TextStyle } from "#ui/text";
|
import { addTextObject, getTextColor } from "#ui/text";
|
||||||
import { UI } from "#ui/ui";
|
import { UI } from "#ui/ui";
|
||||||
import { addUiThemeOverrides } from "#ui/ui-theme";
|
import { addUiThemeOverrides } from "#ui/ui-theme";
|
||||||
import {
|
import {
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import type { TextStyle } from "#ui/text";
|
import type { TextStyle } from "#enums/text-style";
|
||||||
|
|
||||||
export class TextDisplay {
|
export class TextDisplay {
|
||||||
speaker?: string;
|
speaker?: string;
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
import { globalScene } from "#app/global-scene";
|
import { globalScene } from "#app/global-scene";
|
||||||
|
import type { TextStyle } from "#enums/text-style";
|
||||||
import { UiTheme } from "#enums/ui-theme";
|
import { UiTheme } from "#enums/ui-theme";
|
||||||
import type { TextStyle } from "#ui/text";
|
|
||||||
import { getTextWithColors } from "#ui/text";
|
import { getTextWithColors } from "#ui/text";
|
||||||
import { isNullOrUndefined } from "#utils/common";
|
import { isNullOrUndefined } from "#utils/common";
|
||||||
import i18next from "i18next";
|
import i18next from "i18next";
|
||||||
|
@ -1,7 +1,8 @@
|
|||||||
import { Nature } from "#enums/nature";
|
import { Nature } from "#enums/nature";
|
||||||
import { EFFECTIVE_STATS, getShortenedStatKey, Stat } from "#enums/stat";
|
import { EFFECTIVE_STATS, getShortenedStatKey, Stat } from "#enums/stat";
|
||||||
|
import { TextStyle } from "#enums/text-style";
|
||||||
import { UiTheme } from "#enums/ui-theme";
|
import { UiTheme } from "#enums/ui-theme";
|
||||||
import { getBBCodeFrag, TextStyle } from "#ui/text";
|
import { getBBCodeFrag } from "#ui/text";
|
||||||
import { toReadableString } from "#utils/common";
|
import { toReadableString } from "#utils/common";
|
||||||
import i18next from "i18next";
|
import i18next from "i18next";
|
||||||
|
|
||||||
|
59
src/enums/text-style.ts
Normal file
59
src/enums/text-style.ts
Normal file
@ -0,0 +1,59 @@
|
|||||||
|
export const TextStyle = Object.freeze({
|
||||||
|
MESSAGE: 1,
|
||||||
|
WINDOW: 2,
|
||||||
|
WINDOW_ALT: 3,
|
||||||
|
WINDOW_BATTLE_COMMAND: 4,
|
||||||
|
BATTLE_INFO: 5,
|
||||||
|
PARTY: 6,
|
||||||
|
PARTY_RED: 7,
|
||||||
|
PARTY_CANCEL_BUTTON: 8,
|
||||||
|
INSTRUCTIONS_TEXT: 9,
|
||||||
|
MOVE_LABEL: 10,
|
||||||
|
SUMMARY: 11,
|
||||||
|
SUMMARY_DEX_NUM: 12,
|
||||||
|
SUMMARY_DEX_NUM_GOLD: 13,
|
||||||
|
SUMMARY_ALT: 14,
|
||||||
|
SUMMARY_HEADER: 15,
|
||||||
|
SUMMARY_RED: 16,
|
||||||
|
SUMMARY_BLUE: 17,
|
||||||
|
SUMMARY_PINK: 18,
|
||||||
|
SUMMARY_GOLD: 19,
|
||||||
|
SUMMARY_GRAY: 20,
|
||||||
|
SUMMARY_GREEN: 21,
|
||||||
|
SUMMARY_STATS: 22,
|
||||||
|
SUMMARY_STATS_BLUE: 23,
|
||||||
|
SUMMARY_STATS_PINK: 24,
|
||||||
|
SUMMARY_STATS_GOLD: 25,
|
||||||
|
LUCK_VALUE: 26,
|
||||||
|
STATS_HEXAGON: 27,
|
||||||
|
GROWTH_RATE_TYPE: 28,
|
||||||
|
MONEY: 29, // Money default styling (pale yellow)
|
||||||
|
MONEY_WINDOW: 30, // Money displayed in Windows (needs different colors based on theme)
|
||||||
|
HEADER_LABEL: 31,
|
||||||
|
STATS_LABEL: 32,
|
||||||
|
STATS_VALUE: 33,
|
||||||
|
SETTINGS_VALUE: 34,
|
||||||
|
SETTINGS_LABEL: 35,
|
||||||
|
SETTINGS_LABEL_NAVBAR: 36,
|
||||||
|
SETTINGS_SELECTED: 37,
|
||||||
|
SETTINGS_LOCKED: 38,
|
||||||
|
EGG_LIST: 39,
|
||||||
|
EGG_SUMMARY_NAME: 40,
|
||||||
|
EGG_SUMMARY_DEX: 41,
|
||||||
|
STARTER_VALUE_LIMIT: 42,
|
||||||
|
TOOLTIP_TITLE: 43,
|
||||||
|
TOOLTIP_CONTENT: 44,
|
||||||
|
FILTER_BAR_MAIN: 45,
|
||||||
|
MOVE_INFO_CONTENT: 46,
|
||||||
|
MOVE_PP_FULL: 47,
|
||||||
|
MOVE_PP_HALF_FULL: 48,
|
||||||
|
MOVE_PP_NEAR_EMPTY: 49,
|
||||||
|
MOVE_PP_EMPTY: 50,
|
||||||
|
SMALLER_WINDOW_ALT: 51,
|
||||||
|
BGM_BAR: 52,
|
||||||
|
PERFECT_IV: 53,
|
||||||
|
ME_OPTION_DEFAULT: 54, // Default style for choices in ME
|
||||||
|
ME_OPTION_SPECIAL: 55, // Style for choices with special requirements in ME
|
||||||
|
SHADOW_TEXT: 56 // to obscure unavailable options
|
||||||
|
})
|
||||||
|
export type TextStyle = typeof TextStyle[keyof typeof TextStyle];
|
@ -1,9 +1,10 @@
|
|||||||
import { globalScene } from "#app/global-scene";
|
import { globalScene } from "#app/global-scene";
|
||||||
import type { BattlerIndex } from "#enums/battler-index";
|
import type { BattlerIndex } from "#enums/battler-index";
|
||||||
import { HitResult } from "#enums/hit-result";
|
import { HitResult } from "#enums/hit-result";
|
||||||
|
import { TextStyle } from "#enums/text-style";
|
||||||
import type { Pokemon } from "#field/pokemon";
|
import type { Pokemon } from "#field/pokemon";
|
||||||
import type { DamageResult } from "#types/damage-result";
|
import type { DamageResult } from "#types/damage-result";
|
||||||
import { addTextObject, TextStyle } from "#ui/text";
|
import { addTextObject } from "#ui/text";
|
||||||
import { fixedInt, formatStat } from "#utils/common";
|
import { fixedInt, formatStat } from "#utils/common";
|
||||||
|
|
||||||
type TextAndShadowArr = [string | null, string | null];
|
type TextAndShadowArr = [string | null, string | null];
|
||||||
|
@ -5,10 +5,11 @@ import { coerceArray, fixedInt, randInt } from "#utils/common";
|
|||||||
export class PokemonSpriteSparkleHandler {
|
export class PokemonSpriteSparkleHandler {
|
||||||
private sprites: Set<Phaser.GameObjects.Sprite>;
|
private sprites: Set<Phaser.GameObjects.Sprite>;
|
||||||
|
|
||||||
|
private counterTween?: Phaser.Tweens.Tween;
|
||||||
|
|
||||||
setup(): void {
|
setup(): void {
|
||||||
this.sprites = new Set();
|
this.sprites = new Set();
|
||||||
|
this.counterTween = globalScene.tweens.addCounter({
|
||||||
globalScene.tweens.addCounter({
|
|
||||||
duration: fixedInt(200),
|
duration: fixedInt(200),
|
||||||
from: 0,
|
from: 0,
|
||||||
to: 1,
|
to: 1,
|
||||||
@ -78,4 +79,12 @@ export class PokemonSpriteSparkleHandler {
|
|||||||
this.sprites.delete(s);
|
this.sprites.delete(s);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
destroy(): void {
|
||||||
|
this.removeAll();
|
||||||
|
if (this.counterTween) {
|
||||||
|
this.counterTween.destroy();
|
||||||
|
this.counterTween = undefined;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -23,6 +23,7 @@ import type { PokemonType } from "#enums/pokemon-type";
|
|||||||
import { SpeciesId } from "#enums/species-id";
|
import { SpeciesId } from "#enums/species-id";
|
||||||
import { BATTLE_STATS, type PermanentStat, Stat, TEMP_BATTLE_STATS, type TempBattleStat } from "#enums/stat";
|
import { BATTLE_STATS, type PermanentStat, Stat, TEMP_BATTLE_STATS, type TempBattleStat } from "#enums/stat";
|
||||||
import { StatusEffect } from "#enums/status-effect";
|
import { StatusEffect } from "#enums/status-effect";
|
||||||
|
import { TextStyle } from "#enums/text-style";
|
||||||
import type { PlayerPokemon, Pokemon } from "#field/pokemon";
|
import type { PlayerPokemon, Pokemon } from "#field/pokemon";
|
||||||
import type {
|
import type {
|
||||||
DoubleBattleChanceBoosterModifierType,
|
DoubleBattleChanceBoosterModifierType,
|
||||||
@ -40,7 +41,7 @@ import type {
|
|||||||
} from "#modifiers/modifier-type";
|
} from "#modifiers/modifier-type";
|
||||||
import type { VoucherType } from "#system/voucher";
|
import type { VoucherType } from "#system/voucher";
|
||||||
import type { ModifierInstanceMap, ModifierString } from "#types/modifier-types";
|
import type { ModifierInstanceMap, ModifierString } from "#types/modifier-types";
|
||||||
import { addTextObject, TextStyle } from "#ui/text";
|
import { addTextObject } from "#ui/text";
|
||||||
import { BooleanHolder, hslToHex, isNullOrUndefined, NumberHolder, randSeedFloat, toDmgValue } from "#utils/common";
|
import { BooleanHolder, hslToHex, isNullOrUndefined, NumberHolder, randSeedFloat, toDmgValue } from "#utils/common";
|
||||||
import { getModifierType } from "#utils/modifier-utils";
|
import { getModifierType } from "#utils/modifier-utils";
|
||||||
import i18next from "i18next";
|
import i18next from "i18next";
|
||||||
|
@ -1,7 +1,8 @@
|
|||||||
import { globalScene } from "#app/global-scene";
|
import { globalScene } from "#app/global-scene";
|
||||||
import { Phase } from "#app/phase";
|
import { Phase } from "#app/phase";
|
||||||
import { PlayerGender } from "#enums/player-gender";
|
import { PlayerGender } from "#enums/player-gender";
|
||||||
import { addTextObject, TextStyle } from "#ui/text";
|
import { TextStyle } from "#enums/text-style";
|
||||||
|
import { addTextObject } from "#ui/text";
|
||||||
import i18next from "i18next";
|
import i18next from "i18next";
|
||||||
|
|
||||||
export class EndCardPhase extends Phase {
|
export class EndCardPhase extends Phase {
|
||||||
|
@ -2,9 +2,10 @@ import { globalScene } from "#app/global-scene";
|
|||||||
import { getPokemonNameWithAffix } from "#app/messages";
|
import { getPokemonNameWithAffix } from "#app/messages";
|
||||||
import type { BattlerIndex } from "#enums/battler-index";
|
import type { BattlerIndex } from "#enums/battler-index";
|
||||||
import { PERMANENT_STATS, Stat } from "#enums/stat";
|
import { PERMANENT_STATS, Stat } from "#enums/stat";
|
||||||
|
import { TextStyle } from "#enums/text-style";
|
||||||
import { UiMode } from "#enums/ui-mode";
|
import { UiMode } from "#enums/ui-mode";
|
||||||
import { PokemonPhase } from "#phases/pokemon-phase";
|
import { PokemonPhase } from "#phases/pokemon-phase";
|
||||||
import { getTextColor, TextStyle } from "#ui/text";
|
import { getTextColor } from "#ui/text";
|
||||||
import i18next from "i18next";
|
import i18next from "i18next";
|
||||||
|
|
||||||
export class ScanIvsPhase extends PokemonPhase {
|
export class ScanIvsPhase extends PokemonPhase {
|
||||||
|
@ -5,8 +5,9 @@ import { Challenges } from "#enums/challenges";
|
|||||||
import { MysteryEncounterTier } from "#enums/mystery-encounter-tier";
|
import { MysteryEncounterTier } from "#enums/mystery-encounter-tier";
|
||||||
import { MysteryEncounterType } from "#enums/mystery-encounter-type";
|
import { MysteryEncounterType } from "#enums/mystery-encounter-type";
|
||||||
import { SpeciesId } from "#enums/species-id";
|
import { SpeciesId } from "#enums/species-id";
|
||||||
|
import { TextStyle } from "#enums/text-style";
|
||||||
import { WeatherType } from "#enums/weather-type";
|
import { WeatherType } from "#enums/weather-type";
|
||||||
import { addTextObject, TextStyle } from "#ui/text";
|
import { addTextObject } from "#ui/text";
|
||||||
import type { nil } from "#utils/common";
|
import type { nil } from "#utils/common";
|
||||||
import { isNullOrUndefined } from "#utils/common";
|
import { isNullOrUndefined } from "#utils/common";
|
||||||
import i18next from "i18next";
|
import i18next from "i18next";
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
import { globalScene } from "#app/global-scene";
|
import { globalScene } from "#app/global-scene";
|
||||||
import { addTextObject, TextStyle } from "#ui/text";
|
import { TextStyle } from "#enums/text-style";
|
||||||
|
import { addTextObject } from "#ui/text";
|
||||||
import i18next from "i18next";
|
import i18next from "i18next";
|
||||||
|
|
||||||
const barWidth = 118;
|
const barWidth = 118;
|
||||||
|
@ -1,7 +1,8 @@
|
|||||||
import { globalScene } from "#app/global-scene";
|
import { globalScene } from "#app/global-scene";
|
||||||
import { Button } from "#enums/buttons";
|
import { Button } from "#enums/buttons";
|
||||||
|
import { TextStyle } from "#enums/text-style";
|
||||||
import { UiMode } from "#enums/ui-mode";
|
import { UiMode } from "#enums/ui-mode";
|
||||||
import { addBBCodeTextObject, getTextColor, getTextStyleOptions, TextStyle } from "#ui/text";
|
import { addBBCodeTextObject, getTextColor, getTextStyleOptions } from "#ui/text";
|
||||||
import { UiHandler } from "#ui/ui-handler";
|
import { UiHandler } from "#ui/ui-handler";
|
||||||
import { addWindow } from "#ui/ui-theme";
|
import { addWindow } from "#ui/ui-theme";
|
||||||
import { fixedInt, rgbHexToRgba } from "#utils/common";
|
import { fixedInt, rgbHexToRgba } from "#utils/common";
|
||||||
|
@ -1,8 +1,9 @@
|
|||||||
import { globalScene } from "#app/global-scene";
|
import { globalScene } from "#app/global-scene";
|
||||||
import type { PlayerGender } from "#enums/player-gender";
|
import type { PlayerGender } from "#enums/player-gender";
|
||||||
|
import { TextStyle } from "#enums/text-style";
|
||||||
import { Achv, getAchievementDescription } from "#system/achv";
|
import { Achv, getAchievementDescription } from "#system/achv";
|
||||||
import { Voucher } from "#system/voucher";
|
import { Voucher } from "#system/voucher";
|
||||||
import { addTextObject, TextStyle } from "#ui/text";
|
import { addTextObject } from "#ui/text";
|
||||||
|
|
||||||
export class AchvBar extends Phaser.GameObjects.Container {
|
export class AchvBar extends Phaser.GameObjects.Container {
|
||||||
private defaultWidth: number;
|
private defaultWidth: number;
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
import { globalScene } from "#app/global-scene";
|
import { globalScene } from "#app/global-scene";
|
||||||
import { Button } from "#enums/buttons";
|
import { Button } from "#enums/buttons";
|
||||||
import { PlayerGender } from "#enums/player-gender";
|
import { PlayerGender } from "#enums/player-gender";
|
||||||
|
import { TextStyle } from "#enums/text-style";
|
||||||
import type { UiMode } from "#enums/ui-mode";
|
import type { UiMode } from "#enums/ui-mode";
|
||||||
import type { Achv } from "#system/achv";
|
import type { Achv } from "#system/achv";
|
||||||
import { achvs, getAchievementDescription } from "#system/achv";
|
import { achvs, getAchievementDescription } from "#system/achv";
|
||||||
@ -9,7 +10,7 @@ import type { Voucher } from "#system/voucher";
|
|||||||
import { getVoucherTypeIcon, getVoucherTypeName, vouchers } from "#system/voucher";
|
import { getVoucherTypeIcon, getVoucherTypeName, vouchers } from "#system/voucher";
|
||||||
import { MessageUiHandler } from "#ui/message-ui-handler";
|
import { MessageUiHandler } from "#ui/message-ui-handler";
|
||||||
import { ScrollBar } from "#ui/scroll-bar";
|
import { ScrollBar } from "#ui/scroll-bar";
|
||||||
import { addTextObject, TextStyle } from "#ui/text";
|
import { addTextObject } from "#ui/text";
|
||||||
import { addWindow } from "#ui/ui-theme";
|
import { addWindow } from "#ui/ui-theme";
|
||||||
import i18next from "i18next";
|
import i18next from "i18next";
|
||||||
|
|
||||||
|
@ -1,11 +1,11 @@
|
|||||||
import { pokerogueApi } from "#api/pokerogue-api";
|
import { pokerogueApi } from "#api/pokerogue-api";
|
||||||
import { globalScene } from "#app/global-scene";
|
import { globalScene } from "#app/global-scene";
|
||||||
import { Button } from "#enums/buttons";
|
import { Button } from "#enums/buttons";
|
||||||
|
import { TextStyle } from "#enums/text-style";
|
||||||
import { UiMode } from "#enums/ui-mode";
|
import { UiMode } from "#enums/ui-mode";
|
||||||
import type { InputFieldConfig } from "#ui/form-modal-ui-handler";
|
import type { InputFieldConfig } from "#ui/form-modal-ui-handler";
|
||||||
import { FormModalUiHandler } from "#ui/form-modal-ui-handler";
|
import { FormModalUiHandler } from "#ui/form-modal-ui-handler";
|
||||||
import type { ModalConfig } from "#ui/modal-ui-handler";
|
import type { ModalConfig } from "#ui/modal-ui-handler";
|
||||||
import { TextStyle } from "#ui/text";
|
|
||||||
import { formatText } from "#utils/common";
|
import { formatText } from "#utils/common";
|
||||||
|
|
||||||
type AdminUiHandlerService = "discord" | "google";
|
type AdminUiHandlerService = "discord" | "google";
|
||||||
|
@ -3,6 +3,7 @@ import { ArenaTrapTag } from "#data/arena-tag";
|
|||||||
import { TerrainType } from "#data/terrain";
|
import { TerrainType } from "#data/terrain";
|
||||||
import { ArenaTagSide } from "#enums/arena-tag-side";
|
import { ArenaTagSide } from "#enums/arena-tag-side";
|
||||||
import { ArenaTagType } from "#enums/arena-tag-type";
|
import { ArenaTagType } from "#enums/arena-tag-type";
|
||||||
|
import { TextStyle } from "#enums/text-style";
|
||||||
import { WeatherType } from "#enums/weather-type";
|
import { WeatherType } from "#enums/weather-type";
|
||||||
import type { ArenaEvent } from "#events/arena";
|
import type { ArenaEvent } from "#events/arena";
|
||||||
import {
|
import {
|
||||||
@ -14,7 +15,7 @@ import {
|
|||||||
} from "#events/arena";
|
} from "#events/arena";
|
||||||
import type { TurnEndEvent } from "#events/battle-scene";
|
import type { TurnEndEvent } from "#events/battle-scene";
|
||||||
import { BattleSceneEventType } from "#events/battle-scene";
|
import { BattleSceneEventType } from "#events/battle-scene";
|
||||||
import { addTextObject, TextStyle } from "#ui/text";
|
import { addTextObject } from "#ui/text";
|
||||||
import { TimeOfDayWidget } from "#ui/time-of-day-widget";
|
import { TimeOfDayWidget } from "#ui/time-of-day-widget";
|
||||||
import { addWindow, WindowVariant } from "#ui/ui-theme";
|
import { addWindow, WindowVariant } from "#ui/ui-theme";
|
||||||
import { fixedInt, formatText, toCamelCaseString } from "#utils/common";
|
import { fixedInt, formatText, toCamelCaseString } from "#utils/common";
|
||||||
|
@ -2,9 +2,10 @@ import { globalScene } from "#app/global-scene";
|
|||||||
import { getPokeballName } from "#data/pokeball";
|
import { getPokeballName } from "#data/pokeball";
|
||||||
import { Button } from "#enums/buttons";
|
import { Button } from "#enums/buttons";
|
||||||
import { Command } from "#enums/command";
|
import { Command } from "#enums/command";
|
||||||
|
import { TextStyle } from "#enums/text-style";
|
||||||
import { UiMode } from "#enums/ui-mode";
|
import { UiMode } from "#enums/ui-mode";
|
||||||
import type { CommandPhase } from "#phases/command-phase";
|
import type { CommandPhase } from "#phases/command-phase";
|
||||||
import { addTextObject, getTextStyleOptions, TextStyle } from "#ui/text";
|
import { addTextObject, getTextStyleOptions } from "#ui/text";
|
||||||
import { UiHandler } from "#ui/ui-handler";
|
import { UiHandler } from "#ui/ui-handler";
|
||||||
import { addWindow } from "#ui/ui-theme";
|
import { addWindow } from "#ui/ui-theme";
|
||||||
import i18next from "i18next";
|
import i18next from "i18next";
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
import type { InfoToggle } from "#app/battle-scene";
|
import type { InfoToggle } from "#app/battle-scene";
|
||||||
import { globalScene } from "#app/global-scene";
|
import { globalScene } from "#app/global-scene";
|
||||||
import { addTextObject, TextStyle } from "#ui/text";
|
import { TextStyle } from "#enums/text-style";
|
||||||
|
import { addTextObject } from "#ui/text";
|
||||||
import { addWindow } from "#ui/ui-theme";
|
import { addWindow } from "#ui/ui-theme";
|
||||||
import { fixedInt } from "#utils/common";
|
import { fixedInt } from "#utils/common";
|
||||||
import i18next from "i18next";
|
import i18next from "i18next";
|
||||||
|
@ -2,12 +2,13 @@ import { globalScene } from "#app/global-scene";
|
|||||||
import { getPokemonNameWithAffix } from "#app/messages";
|
import { getPokemonNameWithAffix } from "#app/messages";
|
||||||
import { BerryType } from "#enums/berry-type";
|
import { BerryType } from "#enums/berry-type";
|
||||||
import { MoveId } from "#enums/move-id";
|
import { MoveId } from "#enums/move-id";
|
||||||
|
import { TextStyle } from "#enums/text-style";
|
||||||
import { UiTheme } from "#enums/ui-theme";
|
import { UiTheme } from "#enums/ui-theme";
|
||||||
import type { BerryUsedEvent, MoveUsedEvent } from "#events/battle-scene";
|
import type { BerryUsedEvent, MoveUsedEvent } from "#events/battle-scene";
|
||||||
import { BattleSceneEventType } from "#events/battle-scene";
|
import { BattleSceneEventType } from "#events/battle-scene";
|
||||||
import type { EnemyPokemon, Pokemon } from "#field/pokemon";
|
import type { EnemyPokemon, Pokemon } from "#field/pokemon";
|
||||||
import type { Move } from "#moves/move";
|
import type { Move } from "#moves/move";
|
||||||
import { addTextObject, TextStyle } from "#ui/text";
|
import { addTextObject } from "#ui/text";
|
||||||
import { fixedInt } from "#utils/common";
|
import { fixedInt } from "#utils/common";
|
||||||
|
|
||||||
/** Container for info about a {@linkcode Move} */
|
/** Container for info about a {@linkcode Move} */
|
||||||
|
@ -4,9 +4,10 @@ import { getTypeRgb } from "#data/type";
|
|||||||
import { PokemonType } from "#enums/pokemon-type";
|
import { PokemonType } from "#enums/pokemon-type";
|
||||||
import { Stat } from "#enums/stat";
|
import { Stat } from "#enums/stat";
|
||||||
import { StatusEffect } from "#enums/status-effect";
|
import { StatusEffect } from "#enums/status-effect";
|
||||||
|
import { TextStyle } from "#enums/text-style";
|
||||||
import type { Pokemon } from "#field/pokemon";
|
import type { Pokemon } from "#field/pokemon";
|
||||||
import { getVariantTint } from "#sprites/variant";
|
import { getVariantTint } from "#sprites/variant";
|
||||||
import { addTextObject, TextStyle } from "#ui/text";
|
import { addTextObject } from "#ui/text";
|
||||||
import { fixedInt, getLocalizedSpriteKey, getShinyDescriptor } from "#utils/common";
|
import { fixedInt, getLocalizedSpriteKey, getShinyDescriptor } from "#utils/common";
|
||||||
import i18next from "i18next";
|
import i18next from "i18next";
|
||||||
|
|
||||||
|
@ -1,10 +1,11 @@
|
|||||||
import { globalScene } from "#app/global-scene";
|
import { globalScene } from "#app/global-scene";
|
||||||
import { Stat } from "#enums/stat";
|
import { Stat } from "#enums/stat";
|
||||||
|
import { TextStyle } from "#enums/text-style";
|
||||||
import type { EnemyPokemon } from "#field/pokemon";
|
import type { EnemyPokemon } from "#field/pokemon";
|
||||||
import { BattleFlyout } from "#ui/battle-flyout";
|
import { BattleFlyout } from "#ui/battle-flyout";
|
||||||
import type { BattleInfoParamList } from "#ui/battle-info";
|
import type { BattleInfoParamList } from "#ui/battle-info";
|
||||||
import { BattleInfo } from "#ui/battle-info";
|
import { BattleInfo } from "#ui/battle-info";
|
||||||
import { addTextObject, TextStyle } from "#ui/text";
|
import { addTextObject } from "#ui/text";
|
||||||
import { addWindow, WindowVariant } from "#ui/ui-theme";
|
import { addWindow, WindowVariant } from "#ui/ui-theme";
|
||||||
import i18next from "i18next";
|
import i18next from "i18next";
|
||||||
import type { GameObjects } from "phaser";
|
import type { GameObjects } from "phaser";
|
||||||
|
@ -1,9 +1,10 @@
|
|||||||
import { globalScene } from "#app/global-scene";
|
import { globalScene } from "#app/global-scene";
|
||||||
import { Button } from "#enums/buttons";
|
import { Button } from "#enums/buttons";
|
||||||
import { getStatKey, PERMANENT_STATS } from "#enums/stat";
|
import { getStatKey, PERMANENT_STATS } from "#enums/stat";
|
||||||
|
import { TextStyle } from "#enums/text-style";
|
||||||
import { UiMode } from "#enums/ui-mode";
|
import { UiMode } from "#enums/ui-mode";
|
||||||
import { MessageUiHandler } from "#ui/message-ui-handler";
|
import { MessageUiHandler } from "#ui/message-ui-handler";
|
||||||
import { addBBCodeTextObject, addTextObject, getTextColor, TextStyle } from "#ui/text";
|
import { addBBCodeTextObject, addTextObject, getTextColor } from "#ui/text";
|
||||||
import { addWindow } from "#ui/ui-theme";
|
import { addWindow } from "#ui/ui-theme";
|
||||||
import i18next from "i18next";
|
import i18next from "i18next";
|
||||||
import type BBCodeText from "phaser3-rex-plugins/plugins/bbcodetext";
|
import type BBCodeText from "phaser3-rex-plugins/plugins/bbcodetext";
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
import { globalScene } from "#app/global-scene";
|
import { globalScene } from "#app/global-scene";
|
||||||
import { addTextObject, TextStyle } from "#ui/text";
|
import { TextStyle } from "#enums/text-style";
|
||||||
|
import { addTextObject } from "#ui/text";
|
||||||
import { formatText } from "#utils/common";
|
import { formatText } from "#utils/common";
|
||||||
import i18next from "i18next";
|
import i18next from "i18next";
|
||||||
|
|
||||||
|
@ -1,7 +1,8 @@
|
|||||||
import { globalScene } from "#app/global-scene";
|
import { globalScene } from "#app/global-scene";
|
||||||
import { starterColors } from "#app/global-vars/starter-colors";
|
import { starterColors } from "#app/global-vars/starter-colors";
|
||||||
import type { SpeciesId } from "#enums/species-id";
|
import type { SpeciesId } from "#enums/species-id";
|
||||||
import { addTextObject, TextStyle } from "#ui/text";
|
import { TextStyle } from "#enums/text-style";
|
||||||
|
import { addTextObject } from "#ui/text";
|
||||||
import { rgbHexToRgba } from "#utils/common";
|
import { rgbHexToRgba } from "#utils/common";
|
||||||
import { argbFromRgba } from "@material/material-color-utilities";
|
import { argbFromRgba } from "@material/material-color-utilities";
|
||||||
|
|
||||||
|
@ -3,8 +3,9 @@ import type { Challenge } from "#data/challenge";
|
|||||||
import { Button } from "#enums/buttons";
|
import { Button } from "#enums/buttons";
|
||||||
import { Challenges } from "#enums/challenges";
|
import { Challenges } from "#enums/challenges";
|
||||||
import { Color, ShadowColor } from "#enums/color";
|
import { Color, ShadowColor } from "#enums/color";
|
||||||
|
import { TextStyle } from "#enums/text-style";
|
||||||
import type { UiMode } from "#enums/ui-mode";
|
import type { UiMode } from "#enums/ui-mode";
|
||||||
import { addTextObject, TextStyle } from "#ui/text";
|
import { addTextObject } from "#ui/text";
|
||||||
import { UiHandler } from "#ui/ui-handler";
|
import { UiHandler } from "#ui/ui-handler";
|
||||||
import { addWindow } from "#ui/ui-theme";
|
import { addWindow } from "#ui/ui-theme";
|
||||||
import { getLocalizedSpriteKey } from "#utils/common";
|
import { getLocalizedSpriteKey } from "#utils/common";
|
||||||
|
@ -5,11 +5,12 @@ import { Button } from "#enums/buttons";
|
|||||||
import { Command } from "#enums/command";
|
import { Command } from "#enums/command";
|
||||||
import { PokemonType } from "#enums/pokemon-type";
|
import { PokemonType } from "#enums/pokemon-type";
|
||||||
import { SpeciesId } from "#enums/species-id";
|
import { SpeciesId } from "#enums/species-id";
|
||||||
|
import { TextStyle } from "#enums/text-style";
|
||||||
import { UiMode } from "#enums/ui-mode";
|
import { UiMode } from "#enums/ui-mode";
|
||||||
import { TerastallizeAccessModifier } from "#modifiers/modifier";
|
import { TerastallizeAccessModifier } from "#modifiers/modifier";
|
||||||
import type { CommandPhase } from "#phases/command-phase";
|
import type { CommandPhase } from "#phases/command-phase";
|
||||||
import { PartyUiHandler, PartyUiMode } from "#ui/party-ui-handler";
|
import { PartyUiHandler, PartyUiMode } from "#ui/party-ui-handler";
|
||||||
import { addTextObject, TextStyle } from "#ui/text";
|
import { addTextObject } from "#ui/text";
|
||||||
import { UiHandler } from "#ui/ui-handler";
|
import { UiHandler } from "#ui/ui-handler";
|
||||||
import i18next from "i18next";
|
import i18next from "i18next";
|
||||||
|
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
import { pokerogueApi } from "#api/pokerogue-api";
|
import { pokerogueApi } from "#api/pokerogue-api";
|
||||||
import { globalScene } from "#app/global-scene";
|
import { globalScene } from "#app/global-scene";
|
||||||
import { addTextObject, TextStyle } from "#ui/text";
|
import { TextStyle } from "#enums/text-style";
|
||||||
|
import { addTextObject } from "#ui/text";
|
||||||
import { addWindow, WindowVariant } from "#ui/ui-theme";
|
import { addWindow, WindowVariant } from "#ui/ui-theme";
|
||||||
import { executeIf } from "#utils/common";
|
import { executeIf } from "#utils/common";
|
||||||
import { getEnumKeys } from "#utils/enums";
|
import { getEnumKeys } from "#utils/enums";
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
import { globalScene } from "#app/global-scene";
|
import { globalScene } from "#app/global-scene";
|
||||||
|
import { TextStyle } from "#enums/text-style";
|
||||||
import { ScrollBar } from "#ui/scroll-bar";
|
import { ScrollBar } from "#ui/scroll-bar";
|
||||||
import { addTextObject, TextStyle } from "#ui/text";
|
import { addTextObject } from "#ui/text";
|
||||||
import { addWindow, WindowVariant } from "#ui/ui-theme";
|
import { addWindow, WindowVariant } from "#ui/ui-theme";
|
||||||
import i18next from "i18next";
|
import i18next from "i18next";
|
||||||
|
|
||||||
|
@ -1,8 +1,9 @@
|
|||||||
import { globalScene } from "#app/global-scene";
|
import { globalScene } from "#app/global-scene";
|
||||||
|
import { TextStyle } from "#enums/text-style";
|
||||||
import type { EggCountChangedEvent } from "#events/egg";
|
import type { EggCountChangedEvent } from "#events/egg";
|
||||||
import { EggEventType } from "#events/egg";
|
import { EggEventType } from "#events/egg";
|
||||||
import type { EggHatchSceneHandler } from "#ui/egg-hatch-scene-handler";
|
import type { EggHatchSceneHandler } from "#ui/egg-hatch-scene-handler";
|
||||||
import { addTextObject, TextStyle } from "#ui/text";
|
import { addTextObject } from "#ui/text";
|
||||||
import { addWindow } from "#ui/ui-theme";
|
import { addWindow } from "#ui/ui-theme";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -6,10 +6,11 @@ import { Egg, getLegendaryGachaSpeciesForTimestamp } from "#data/egg";
|
|||||||
import { Button } from "#enums/buttons";
|
import { Button } from "#enums/buttons";
|
||||||
import { EggTier } from "#enums/egg-type";
|
import { EggTier } from "#enums/egg-type";
|
||||||
import { GachaType } from "#enums/gacha-types";
|
import { GachaType } from "#enums/gacha-types";
|
||||||
|
import { TextStyle } from "#enums/text-style";
|
||||||
import { UiMode } from "#enums/ui-mode";
|
import { UiMode } from "#enums/ui-mode";
|
||||||
import { getVoucherTypeIcon, VoucherType } from "#system/voucher";
|
import { getVoucherTypeIcon, VoucherType } from "#system/voucher";
|
||||||
import { MessageUiHandler } from "#ui/message-ui-handler";
|
import { MessageUiHandler } from "#ui/message-ui-handler";
|
||||||
import { addTextObject, getEggTierTextTint, getTextStyleOptions, TextStyle } from "#ui/text";
|
import { addTextObject, getEggTierTextTint, getTextStyleOptions } from "#ui/text";
|
||||||
import { addWindow } from "#ui/ui-theme";
|
import { addWindow } from "#ui/ui-theme";
|
||||||
import { fixedInt, randSeedShuffle } from "#utils/common";
|
import { fixedInt, randSeedShuffle } from "#utils/common";
|
||||||
import { getEnumValues } from "#utils/enums";
|
import { getEnumValues } from "#utils/enums";
|
||||||
@ -74,7 +75,7 @@ export class EggGachaUiHandler extends MessageUiHandler {
|
|||||||
const gachaInfoContainer = globalScene.add.container(160, 46);
|
const gachaInfoContainer = globalScene.add.container(160, 46);
|
||||||
|
|
||||||
const currentLanguage = i18next.resolvedLanguage ?? "en";
|
const currentLanguage = i18next.resolvedLanguage ?? "en";
|
||||||
let gachaTextStyle = TextStyle.WINDOW_ALT;
|
let gachaTextStyle: TextStyle = TextStyle.WINDOW_ALT;
|
||||||
let gachaX = 4;
|
let gachaX = 4;
|
||||||
let gachaY = 0;
|
let gachaY = 0;
|
||||||
let pokemonIconX = -20;
|
let pokemonIconX = -20;
|
||||||
|
@ -1,11 +1,12 @@
|
|||||||
import { globalScene } from "#app/global-scene";
|
import { globalScene } from "#app/global-scene";
|
||||||
import { Button } from "#enums/buttons";
|
import { Button } from "#enums/buttons";
|
||||||
|
import { TextStyle } from "#enums/text-style";
|
||||||
import { UiMode } from "#enums/ui-mode";
|
import { UiMode } from "#enums/ui-mode";
|
||||||
import { MessageUiHandler } from "#ui/message-ui-handler";
|
import { MessageUiHandler } from "#ui/message-ui-handler";
|
||||||
import { PokemonIconAnimHandler, PokemonIconAnimMode } from "#ui/pokemon-icon-anim-handler";
|
import { PokemonIconAnimHandler, PokemonIconAnimMode } from "#ui/pokemon-icon-anim-handler";
|
||||||
import { ScrollBar } from "#ui/scroll-bar";
|
import { ScrollBar } from "#ui/scroll-bar";
|
||||||
import { ScrollableGridUiHandler } from "#ui/scrollable-grid-handler";
|
import { ScrollableGridUiHandler } from "#ui/scrollable-grid-handler";
|
||||||
import { addTextObject, TextStyle } from "#ui/text";
|
import { addTextObject } from "#ui/text";
|
||||||
import { addWindow } from "#ui/ui-theme";
|
import { addWindow } from "#ui/ui-theme";
|
||||||
import i18next from "i18next";
|
import i18next from "i18next";
|
||||||
|
|
||||||
|
@ -1,8 +1,9 @@
|
|||||||
import { globalScene } from "#app/global-scene";
|
import { globalScene } from "#app/global-scene";
|
||||||
import { Button } from "#enums/buttons";
|
import { Button } from "#enums/buttons";
|
||||||
|
import { TextStyle } from "#enums/text-style";
|
||||||
import { UiMode } from "#enums/ui-mode";
|
import { UiMode } from "#enums/ui-mode";
|
||||||
import { MessageUiHandler } from "#ui/message-ui-handler";
|
import { MessageUiHandler } from "#ui/message-ui-handler";
|
||||||
import { addTextObject, TextStyle } from "#ui/text";
|
import { addTextObject } from "#ui/text";
|
||||||
|
|
||||||
export class EvolutionSceneHandler extends MessageUiHandler {
|
export class EvolutionSceneHandler extends MessageUiHandler {
|
||||||
public evolutionContainer: Phaser.GameObjects.Container;
|
public evolutionContainer: Phaser.GameObjects.Container;
|
||||||
|
@ -7,12 +7,13 @@ import { Command } from "#enums/command";
|
|||||||
import { MoveCategory } from "#enums/move-category";
|
import { MoveCategory } from "#enums/move-category";
|
||||||
import { MoveUseMode } from "#enums/move-use-mode";
|
import { MoveUseMode } from "#enums/move-use-mode";
|
||||||
import { PokemonType } from "#enums/pokemon-type";
|
import { PokemonType } from "#enums/pokemon-type";
|
||||||
|
import { TextStyle } from "#enums/text-style";
|
||||||
import { UiMode } from "#enums/ui-mode";
|
import { UiMode } from "#enums/ui-mode";
|
||||||
import type { EnemyPokemon, Pokemon } from "#field/pokemon";
|
import type { EnemyPokemon, Pokemon } from "#field/pokemon";
|
||||||
import type { PokemonMove } from "#moves/pokemon-move";
|
import type { PokemonMove } from "#moves/pokemon-move";
|
||||||
import type { CommandPhase } from "#phases/command-phase";
|
import type { CommandPhase } from "#phases/command-phase";
|
||||||
import { MoveInfoOverlay } from "#ui/move-info-overlay";
|
import { MoveInfoOverlay } from "#ui/move-info-overlay";
|
||||||
import { addTextObject, TextStyle } from "#ui/text";
|
import { addTextObject } from "#ui/text";
|
||||||
import { UiHandler } from "#ui/ui-handler";
|
import { UiHandler } from "#ui/ui-handler";
|
||||||
import { fixedInt, getLocalizedSpriteKey, padInt } from "#utils/common";
|
import { fixedInt, getLocalizedSpriteKey, padInt } from "#utils/common";
|
||||||
import i18next from "i18next";
|
import i18next from "i18next";
|
||||||
@ -284,7 +285,7 @@ export class FightUiHandler extends UiHandler implements InfoToggle {
|
|||||||
|
|
||||||
const ppColorStyle = FightUiHandler.ppRatioToColor(pp / maxPP);
|
const ppColorStyle = FightUiHandler.ppRatioToColor(pp / maxPP);
|
||||||
|
|
||||||
//** Changes the text color and shadow according to the determined TextStyle */
|
// Changes the text color and shadow according to the determined TextStyle
|
||||||
this.ppText.setColor(this.getTextColor(ppColorStyle, false)).setShadowColor(this.getTextColor(ppColorStyle, true));
|
this.ppText.setColor(this.getTextColor(ppColorStyle, false)).setShadowColor(this.getTextColor(ppColorStyle, true));
|
||||||
this.moveInfoOverlay.show(pokemonMove.getMove());
|
this.moveInfoOverlay.show(pokemonMove.getMove());
|
||||||
|
|
||||||
|
@ -1,10 +1,11 @@
|
|||||||
import { globalScene } from "#app/global-scene";
|
import { globalScene } from "#app/global-scene";
|
||||||
import type { DropDownColumn } from "#enums/drop-down-column";
|
import type { DropDownColumn } from "#enums/drop-down-column";
|
||||||
|
import { TextStyle } from "#enums/text-style";
|
||||||
import type { UiTheme } from "#enums/ui-theme";
|
import type { UiTheme } from "#enums/ui-theme";
|
||||||
import type { DropDown } from "#ui/dropdown";
|
import type { DropDown } from "#ui/dropdown";
|
||||||
import { DropDownType } from "#ui/dropdown";
|
import { DropDownType } from "#ui/dropdown";
|
||||||
import type { StarterContainer } from "#ui/starter-container";
|
import type { StarterContainer } from "#ui/starter-container";
|
||||||
import { addTextObject, getTextColor, TextStyle } from "#ui/text";
|
import { addTextObject, getTextColor } from "#ui/text";
|
||||||
import { addWindow, WindowVariant } from "#ui/ui-theme";
|
import { addWindow, WindowVariant } from "#ui/ui-theme";
|
||||||
|
|
||||||
export class FilterBar extends Phaser.GameObjects.Container {
|
export class FilterBar extends Phaser.GameObjects.Container {
|
||||||
|
@ -1,9 +1,10 @@
|
|||||||
import { globalScene } from "#app/global-scene";
|
import { globalScene } from "#app/global-scene";
|
||||||
|
import { TextStyle } from "#enums/text-style";
|
||||||
import { UiMode } from "#enums/ui-mode";
|
import { UiMode } from "#enums/ui-mode";
|
||||||
import type { UiTheme } from "#enums/ui-theme";
|
import type { UiTheme } from "#enums/ui-theme";
|
||||||
import type { AwaitableUiHandler } from "#ui/awaitable-ui-handler";
|
import type { AwaitableUiHandler } from "#ui/awaitable-ui-handler";
|
||||||
import type { StarterContainer } from "#ui/starter-container";
|
import type { StarterContainer } from "#ui/starter-container";
|
||||||
import { addTextObject, getTextColor, TextStyle } from "#ui/text";
|
import { addTextObject, getTextColor } from "#ui/text";
|
||||||
import type { UI } from "#ui/ui";
|
import type { UI } from "#ui/ui";
|
||||||
import { addWindow, WindowVariant } from "#ui/ui-theme";
|
import { addWindow, WindowVariant } from "#ui/ui-theme";
|
||||||
import i18next from "i18next";
|
import i18next from "i18next";
|
||||||
|
@ -1,9 +1,10 @@
|
|||||||
import { globalScene } from "#app/global-scene";
|
import { globalScene } from "#app/global-scene";
|
||||||
import { Button } from "#enums/buttons";
|
import { Button } from "#enums/buttons";
|
||||||
|
import { TextStyle } from "#enums/text-style";
|
||||||
import type { UiMode } from "#enums/ui-mode";
|
import type { UiMode } from "#enums/ui-mode";
|
||||||
import type { ModalConfig } from "#ui/modal-ui-handler";
|
import type { ModalConfig } from "#ui/modal-ui-handler";
|
||||||
import { ModalUiHandler } from "#ui/modal-ui-handler";
|
import { ModalUiHandler } from "#ui/modal-ui-handler";
|
||||||
import { addTextInputObject, addTextObject, TextStyle } from "#ui/text";
|
import { addTextInputObject, addTextObject } from "#ui/text";
|
||||||
import { addWindow, WindowVariant } from "#ui/ui-theme";
|
import { addWindow, WindowVariant } from "#ui/ui-theme";
|
||||||
import { fixedInt } from "#utils/common";
|
import { fixedInt } from "#utils/common";
|
||||||
import type InputText from "phaser3-rex-plugins/plugins/inputtext";
|
import type InputText from "phaser3-rex-plugins/plugins/inputtext";
|
||||||
|
@ -2,9 +2,10 @@ import { globalScene } from "#app/global-scene";
|
|||||||
import { speciesStarterCosts } from "#balance/starters";
|
import { speciesStarterCosts } from "#balance/starters";
|
||||||
import { Button } from "#enums/buttons";
|
import { Button } from "#enums/buttons";
|
||||||
import { DexAttr } from "#enums/dex-attr";
|
import { DexAttr } from "#enums/dex-attr";
|
||||||
|
import { TextStyle } from "#enums/text-style";
|
||||||
import { UiTheme } from "#enums/ui-theme";
|
import { UiTheme } from "#enums/ui-theme";
|
||||||
import type { GameData } from "#system/game-data";
|
import type { GameData } from "#system/game-data";
|
||||||
import { addTextObject, TextStyle } from "#ui/text";
|
import { addTextObject } from "#ui/text";
|
||||||
import { UiHandler } from "#ui/ui-handler";
|
import { UiHandler } from "#ui/ui-handler";
|
||||||
import { addWindow } from "#ui/ui-theme";
|
import { addWindow } from "#ui/ui-theme";
|
||||||
import { formatFancyLargeNumber, getPlayTimeString, toReadableString } from "#utils/common";
|
import { formatFancyLargeNumber, getPlayTimeString, toReadableString } from "#utils/common";
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
|
import { TextStyle } from "#enums/text-style";
|
||||||
import type { UiMode } from "#enums/ui-mode";
|
import type { UiMode } from "#enums/ui-mode";
|
||||||
import { ModalUiHandler } from "#ui/modal-ui-handler";
|
import { ModalUiHandler } from "#ui/modal-ui-handler";
|
||||||
import { addTextObject, TextStyle } from "#ui/text";
|
import { addTextObject } from "#ui/text";
|
||||||
import i18next from "i18next";
|
import i18next from "i18next";
|
||||||
|
|
||||||
export class LoadingModalUiHandler extends ModalUiHandler {
|
export class LoadingModalUiHandler extends ModalUiHandler {
|
||||||
|
@ -1,11 +1,12 @@
|
|||||||
import { pokerogueApi } from "#api/pokerogue-api";
|
import { pokerogueApi } from "#api/pokerogue-api";
|
||||||
import { globalScene } from "#app/global-scene";
|
import { globalScene } from "#app/global-scene";
|
||||||
|
import { TextStyle } from "#enums/text-style";
|
||||||
import { UiMode } from "#enums/ui-mode";
|
import { UiMode } from "#enums/ui-mode";
|
||||||
import type { OptionSelectItem } from "#ui/abstact-option-select-ui-handler";
|
import type { OptionSelectItem } from "#ui/abstact-option-select-ui-handler";
|
||||||
import type { InputFieldConfig } from "#ui/form-modal-ui-handler";
|
import type { InputFieldConfig } from "#ui/form-modal-ui-handler";
|
||||||
import { FormModalUiHandler } from "#ui/form-modal-ui-handler";
|
import { FormModalUiHandler } from "#ui/form-modal-ui-handler";
|
||||||
import type { ModalConfig } from "#ui/modal-ui-handler";
|
import type { ModalConfig } from "#ui/modal-ui-handler";
|
||||||
import { addTextObject, TextStyle } from "#ui/text";
|
import { addTextObject } from "#ui/text";
|
||||||
import { addWindow } from "#ui/ui-theme";
|
import { addWindow } from "#ui/ui-theme";
|
||||||
import { fixedInt } from "#utils/common";
|
import { fixedInt } from "#utils/common";
|
||||||
import i18next from "i18next";
|
import i18next from "i18next";
|
||||||
|
@ -5,13 +5,14 @@ import { bypassLogin } from "#app/global-vars/bypass-login";
|
|||||||
import { handleTutorial, Tutorial } from "#app/tutorial";
|
import { handleTutorial, Tutorial } from "#app/tutorial";
|
||||||
import { Button } from "#enums/buttons";
|
import { Button } from "#enums/buttons";
|
||||||
import { GameDataType } from "#enums/game-data-type";
|
import { GameDataType } from "#enums/game-data-type";
|
||||||
|
import { TextStyle } from "#enums/text-style";
|
||||||
import { UiMode } from "#enums/ui-mode";
|
import { UiMode } from "#enums/ui-mode";
|
||||||
import type { OptionSelectConfig, OptionSelectItem } from "#ui/abstact-option-select-ui-handler";
|
import type { OptionSelectConfig, OptionSelectItem } from "#ui/abstact-option-select-ui-handler";
|
||||||
import { AdminMode, getAdminModeName } from "#ui/admin-ui-handler";
|
import { AdminMode, getAdminModeName } from "#ui/admin-ui-handler";
|
||||||
import type { AwaitableUiHandler } from "#ui/awaitable-ui-handler";
|
import type { AwaitableUiHandler } from "#ui/awaitable-ui-handler";
|
||||||
import { BgmBar } from "#ui/bgm-bar";
|
import { BgmBar } from "#ui/bgm-bar";
|
||||||
import { MessageUiHandler } from "#ui/message-ui-handler";
|
import { MessageUiHandler } from "#ui/message-ui-handler";
|
||||||
import { addTextObject, getTextStyleOptions, TextStyle } from "#ui/text";
|
import { addTextObject, getTextStyleOptions } from "#ui/text";
|
||||||
import { addWindow, WindowVariant } from "#ui/ui-theme";
|
import { addWindow, WindowVariant } from "#ui/ui-theme";
|
||||||
import { fixedInt, isLocal, sessionIdKey } from "#utils/common";
|
import { fixedInt, isLocal, sessionIdKey } from "#utils/common";
|
||||||
import { getCookie } from "#utils/cookies";
|
import { getCookie } from "#utils/cookies";
|
||||||
|
@ -1,7 +1,8 @@
|
|||||||
import { globalScene } from "#app/global-scene";
|
import { globalScene } from "#app/global-scene";
|
||||||
import type { Button } from "#enums/buttons";
|
import type { Button } from "#enums/buttons";
|
||||||
|
import { TextStyle } from "#enums/text-style";
|
||||||
import type { UiMode } from "#enums/ui-mode";
|
import type { UiMode } from "#enums/ui-mode";
|
||||||
import { addTextObject, TextStyle } from "#ui/text";
|
import { addTextObject } from "#ui/text";
|
||||||
import { UiHandler } from "#ui/ui-handler";
|
import { UiHandler } from "#ui/ui-handler";
|
||||||
import { addWindow, WindowVariant } from "#ui/ui-theme";
|
import { addWindow, WindowVariant } from "#ui/ui-theme";
|
||||||
|
|
||||||
|
@ -6,13 +6,14 @@ import { getPokeballAtlasKey } from "#data/pokeball";
|
|||||||
import { Button } from "#enums/buttons";
|
import { Button } from "#enums/buttons";
|
||||||
import type { PokeballType } from "#enums/pokeball";
|
import type { PokeballType } from "#enums/pokeball";
|
||||||
import { ShopCursorTarget } from "#enums/shop-cursor-target";
|
import { ShopCursorTarget } from "#enums/shop-cursor-target";
|
||||||
|
import { TextStyle } from "#enums/text-style";
|
||||||
import { UiMode } from "#enums/ui-mode";
|
import { UiMode } from "#enums/ui-mode";
|
||||||
import { HealShopCostModifier, LockModifierTiersModifier, PokemonHeldItemModifier } from "#modifiers/modifier";
|
import { HealShopCostModifier, LockModifierTiersModifier, PokemonHeldItemModifier } from "#modifiers/modifier";
|
||||||
import type { ModifierTypeOption } from "#modifiers/modifier-type";
|
import type { ModifierTypeOption } from "#modifiers/modifier-type";
|
||||||
import { getPlayerShopModifierTypeOptionsForWave, TmModifierType } from "#modifiers/modifier-type";
|
import { getPlayerShopModifierTypeOptionsForWave, TmModifierType } from "#modifiers/modifier-type";
|
||||||
import { AwaitableUiHandler } from "#ui/awaitable-ui-handler";
|
import { AwaitableUiHandler } from "#ui/awaitable-ui-handler";
|
||||||
import { MoveInfoOverlay } from "#ui/move-info-overlay";
|
import { MoveInfoOverlay } from "#ui/move-info-overlay";
|
||||||
import { addTextObject, getModifierTierTextTint, getTextColor, getTextStyleOptions, TextStyle } from "#ui/text";
|
import { addTextObject, getModifierTierTextTint, getTextColor, getTextStyleOptions } from "#ui/text";
|
||||||
import { formatMoney, NumberHolder } from "#utils/common";
|
import { formatMoney, NumberHolder } from "#utils/common";
|
||||||
import i18next from "i18next";
|
import i18next from "i18next";
|
||||||
import Phaser from "phaser";
|
import Phaser from "phaser";
|
||||||
|
@ -2,8 +2,9 @@ import type { InfoToggle } from "#app/battle-scene";
|
|||||||
import { globalScene } from "#app/global-scene";
|
import { globalScene } from "#app/global-scene";
|
||||||
import { MoveCategory } from "#enums/move-category";
|
import { MoveCategory } from "#enums/move-category";
|
||||||
import { PokemonType } from "#enums/pokemon-type";
|
import { PokemonType } from "#enums/pokemon-type";
|
||||||
|
import { TextStyle } from "#enums/text-style";
|
||||||
import type { Move } from "#moves/move";
|
import type { Move } from "#moves/move";
|
||||||
import { addTextObject, TextStyle } from "#ui/text";
|
import { addTextObject } from "#ui/text";
|
||||||
import { addWindow } from "#ui/ui-theme";
|
import { addWindow } from "#ui/ui-theme";
|
||||||
import { fixedInt, getLocalizedSpriteKey } from "#utils/common";
|
import { fixedInt, getLocalizedSpriteKey } from "#utils/common";
|
||||||
import i18next from "i18next";
|
import i18next from "i18next";
|
||||||
|
@ -3,13 +3,14 @@ import { getPokeballAtlasKey } from "#data/pokeball";
|
|||||||
import { Button } from "#enums/buttons";
|
import { Button } from "#enums/buttons";
|
||||||
import { MysteryEncounterOptionMode } from "#enums/mystery-encounter-option-mode";
|
import { MysteryEncounterOptionMode } from "#enums/mystery-encounter-option-mode";
|
||||||
import { MysteryEncounterTier } from "#enums/mystery-encounter-tier";
|
import { MysteryEncounterTier } from "#enums/mystery-encounter-tier";
|
||||||
|
import { TextStyle } from "#enums/text-style";
|
||||||
import { UiMode } from "#enums/ui-mode";
|
import { UiMode } from "#enums/ui-mode";
|
||||||
import { getEncounterText } from "#mystery-encounters/encounter-dialogue-utils";
|
import { getEncounterText } from "#mystery-encounters/encounter-dialogue-utils";
|
||||||
import type { OptionSelectSettings } from "#mystery-encounters/encounter-phase-utils";
|
import type { OptionSelectSettings } from "#mystery-encounters/encounter-phase-utils";
|
||||||
import type { MysteryEncounterOption } from "#mystery-encounters/mystery-encounter-option";
|
import type { MysteryEncounterOption } from "#mystery-encounters/mystery-encounter-option";
|
||||||
import type { MysteryEncounterPhase } from "#phases/mystery-encounter-phases";
|
import type { MysteryEncounterPhase } from "#phases/mystery-encounter-phases";
|
||||||
import { PartyUiMode } from "#ui/party-ui-handler";
|
import { PartyUiMode } from "#ui/party-ui-handler";
|
||||||
import { addBBCodeTextObject, getBBCodeFrag, TextStyle } from "#ui/text";
|
import { addBBCodeTextObject, getBBCodeFrag } from "#ui/text";
|
||||||
import { UiHandler } from "#ui/ui-handler";
|
import { UiHandler } from "#ui/ui-handler";
|
||||||
import { addWindow, WindowVariant } from "#ui/ui-theme";
|
import { addWindow, WindowVariant } from "#ui/ui-theme";
|
||||||
import { fixedInt, isNullOrUndefined } from "#utils/common";
|
import { fixedInt, isNullOrUndefined } from "#utils/common";
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
import { globalScene } from "#app/global-scene";
|
import { globalScene } from "#app/global-scene";
|
||||||
|
import { TextStyle } from "#enums/text-style";
|
||||||
import type { Pokemon } from "#field/pokemon";
|
import type { Pokemon } from "#field/pokemon";
|
||||||
import { addTextObject, TextStyle } from "#ui/text";
|
import { addTextObject } from "#ui/text";
|
||||||
import i18next from "i18next";
|
import i18next from "i18next";
|
||||||
|
|
||||||
export class PartyExpBar extends Phaser.GameObjects.Container {
|
export class PartyExpBar extends Phaser.GameObjects.Container {
|
||||||
|
@ -13,6 +13,7 @@ import { MoveId } from "#enums/move-id";
|
|||||||
import { MoveResult } from "#enums/move-result";
|
import { MoveResult } from "#enums/move-result";
|
||||||
import { SpeciesId } from "#enums/species-id";
|
import { SpeciesId } from "#enums/species-id";
|
||||||
import { StatusEffect } from "#enums/status-effect";
|
import { StatusEffect } from "#enums/status-effect";
|
||||||
|
import { TextStyle } from "#enums/text-style";
|
||||||
import { UiMode } from "#enums/ui-mode";
|
import { UiMode } from "#enums/ui-mode";
|
||||||
import type { PlayerPokemon, Pokemon } from "#field/pokemon";
|
import type { PlayerPokemon, Pokemon } from "#field/pokemon";
|
||||||
import type { PokemonFormChangeItemModifier, PokemonHeldItemModifier } from "#modifiers/modifier";
|
import type { PokemonFormChangeItemModifier, PokemonHeldItemModifier } from "#modifiers/modifier";
|
||||||
@ -23,7 +24,7 @@ import type { TurnMove } from "#types/turn-move";
|
|||||||
import { MessageUiHandler } from "#ui/message-ui-handler";
|
import { MessageUiHandler } from "#ui/message-ui-handler";
|
||||||
import { MoveInfoOverlay } from "#ui/move-info-overlay";
|
import { MoveInfoOverlay } from "#ui/move-info-overlay";
|
||||||
import { PokemonIconAnimHandler, PokemonIconAnimMode } from "#ui/pokemon-icon-anim-handler";
|
import { PokemonIconAnimHandler, PokemonIconAnimMode } from "#ui/pokemon-icon-anim-handler";
|
||||||
import { addBBCodeTextObject, addTextObject, getTextColor, TextStyle } from "#ui/text";
|
import { addBBCodeTextObject, addTextObject, getTextColor } from "#ui/text";
|
||||||
import { addWindow } from "#ui/ui-theme";
|
import { addWindow } from "#ui/ui-theme";
|
||||||
import { BooleanHolder, getLocalizedSpriteKey, randInt, toReadableString } from "#utils/common";
|
import { BooleanHolder, getLocalizedSpriteKey, randInt, toReadableString } from "#utils/common";
|
||||||
import i18next from "i18next";
|
import i18next from "i18next";
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
import type { InfoToggle } from "#app/battle-scene";
|
import type { InfoToggle } from "#app/battle-scene";
|
||||||
import { globalScene } from "#app/global-scene";
|
import { globalScene } from "#app/global-scene";
|
||||||
import { addTextObject, TextStyle } from "#ui/text";
|
import { TextStyle } from "#enums/text-style";
|
||||||
|
import { addTextObject } from "#ui/text";
|
||||||
import { addWindow } from "#ui/ui-theme";
|
import { addWindow } from "#ui/ui-theme";
|
||||||
import { fixedInt } from "#utils/common";
|
import { fixedInt } from "#utils/common";
|
||||||
|
|
||||||
|
@ -1,7 +1,8 @@
|
|||||||
import { globalScene } from "#app/global-scene";
|
import { globalScene } from "#app/global-scene";
|
||||||
import type { PokemonSpecies } from "#data/pokemon-species";
|
import type { PokemonSpecies } from "#data/pokemon-species";
|
||||||
|
import { TextStyle } from "#enums/text-style";
|
||||||
import type { Variant } from "#sprites/variant";
|
import type { Variant } from "#sprites/variant";
|
||||||
import { addTextObject, TextStyle } from "#ui/text";
|
import { addTextObject } from "#ui/text";
|
||||||
import { isNullOrUndefined } from "#utils/common";
|
import { isNullOrUndefined } from "#utils/common";
|
||||||
|
|
||||||
interface SpeciesDetails {
|
interface SpeciesDetails {
|
||||||
|
@ -38,6 +38,7 @@ import type { Nature } from "#enums/nature";
|
|||||||
import { Passive as PassiveAttr } from "#enums/passive";
|
import { Passive as PassiveAttr } from "#enums/passive";
|
||||||
import { PokemonType } from "#enums/pokemon-type";
|
import { PokemonType } from "#enums/pokemon-type";
|
||||||
import { SpeciesId } from "#enums/species-id";
|
import { SpeciesId } from "#enums/species-id";
|
||||||
|
import { TextStyle } from "#enums/text-style";
|
||||||
import { TimeOfDay } from "#enums/time-of-day";
|
import { TimeOfDay } from "#enums/time-of-day";
|
||||||
import { UiMode } from "#enums/ui-mode";
|
import { UiMode } from "#enums/ui-mode";
|
||||||
import type { Variant } from "#sprites/variant";
|
import type { Variant } from "#sprites/variant";
|
||||||
@ -51,7 +52,7 @@ import { MessageUiHandler } from "#ui/message-ui-handler";
|
|||||||
import { MoveInfoOverlay } from "#ui/move-info-overlay";
|
import { MoveInfoOverlay } from "#ui/move-info-overlay";
|
||||||
import { PokedexInfoOverlay } from "#ui/pokedex-info-overlay";
|
import { PokedexInfoOverlay } from "#ui/pokedex-info-overlay";
|
||||||
import { StatsContainer } from "#ui/stats-container";
|
import { StatsContainer } from "#ui/stats-container";
|
||||||
import { addBBCodeTextObject, addTextObject, getTextColor, getTextStyleOptions, TextStyle } from "#ui/text";
|
import { addBBCodeTextObject, addTextObject, getTextColor, getTextStyleOptions } from "#ui/text";
|
||||||
import { addWindow } from "#ui/ui-theme";
|
import { addWindow } from "#ui/ui-theme";
|
||||||
import {
|
import {
|
||||||
BooleanHolder,
|
BooleanHolder,
|
||||||
|
@ -26,6 +26,7 @@ import type { Nature } from "#enums/nature";
|
|||||||
import { Passive as PassiveAttr } from "#enums/passive";
|
import { Passive as PassiveAttr } from "#enums/passive";
|
||||||
import { PokemonType } from "#enums/pokemon-type";
|
import { PokemonType } from "#enums/pokemon-type";
|
||||||
import type { SpeciesId } from "#enums/species-id";
|
import type { SpeciesId } from "#enums/species-id";
|
||||||
|
import { TextStyle } from "#enums/text-style";
|
||||||
import { UiMode } from "#enums/ui-mode";
|
import { UiMode } from "#enums/ui-mode";
|
||||||
import type { Variant } from "#sprites/variant";
|
import type { Variant } from "#sprites/variant";
|
||||||
import { getVariantIcon, getVariantTint } from "#sprites/variant";
|
import { getVariantIcon, getVariantTint } from "#sprites/variant";
|
||||||
@ -40,7 +41,7 @@ import { MessageUiHandler } from "#ui/message-ui-handler";
|
|||||||
import { PokedexMonContainer } from "#ui/pokedex-mon-container";
|
import { PokedexMonContainer } from "#ui/pokedex-mon-container";
|
||||||
import { PokemonIconAnimHandler, PokemonIconAnimMode } from "#ui/pokemon-icon-anim-handler";
|
import { PokemonIconAnimHandler, PokemonIconAnimMode } from "#ui/pokemon-icon-anim-handler";
|
||||||
import { ScrollBar } from "#ui/scroll-bar";
|
import { ScrollBar } from "#ui/scroll-bar";
|
||||||
import { addTextObject, TextStyle } from "#ui/text";
|
import { addTextObject } from "#ui/text";
|
||||||
import { addWindow } from "#ui/ui-theme";
|
import { addWindow } from "#ui/ui-theme";
|
||||||
import { BooleanHolder, fixedInt, getLocalizedSpriteKey, padInt, randIntRange, rgbHexToRgba } from "#utils/common";
|
import { BooleanHolder, fixedInt, getLocalizedSpriteKey, padInt, randIntRange, rgbHexToRgba } from "#utils/common";
|
||||||
import type { StarterPreferences } from "#utils/data";
|
import type { StarterPreferences } from "#utils/data";
|
||||||
|
@ -8,9 +8,10 @@ import { Gender } from "#data/gender";
|
|||||||
import { getPokemonSpeciesForm } from "#data/pokemon-species";
|
import { getPokemonSpeciesForm } from "#data/pokemon-species";
|
||||||
import { PokemonType } from "#enums/pokemon-type";
|
import { PokemonType } from "#enums/pokemon-type";
|
||||||
import { SpeciesId } from "#enums/species-id";
|
import { SpeciesId } from "#enums/species-id";
|
||||||
|
import { TextStyle } from "#enums/text-style";
|
||||||
import type { PlayerPokemon } from "#field/pokemon";
|
import type { PlayerPokemon } from "#field/pokemon";
|
||||||
import { PokemonInfoContainer } from "#ui/pokemon-info-container";
|
import { PokemonInfoContainer } from "#ui/pokemon-info-container";
|
||||||
import { addTextObject, TextStyle } from "#ui/text";
|
import { addTextObject } from "#ui/text";
|
||||||
import { padInt, rgbHexToRgba } from "#utils/common";
|
import { padInt, rgbHexToRgba } from "#utils/common";
|
||||||
import { argbFromRgba } from "@material/material-color-utilities";
|
import { argbFromRgba } from "@material/material-color-utilities";
|
||||||
|
|
||||||
|
@ -3,13 +3,14 @@ import { Gender, getGenderColor, getGenderSymbol } from "#data/gender";
|
|||||||
import { getNatureName } from "#data/nature";
|
import { getNatureName } from "#data/nature";
|
||||||
import { DexAttr } from "#enums/dex-attr";
|
import { DexAttr } from "#enums/dex-attr";
|
||||||
import { PokemonType } from "#enums/pokemon-type";
|
import { PokemonType } from "#enums/pokemon-type";
|
||||||
|
import { TextStyle } from "#enums/text-style";
|
||||||
import type { Pokemon } from "#field/pokemon";
|
import type { Pokemon } from "#field/pokemon";
|
||||||
import { getVariantTint } from "#sprites/variant";
|
import { getVariantTint } from "#sprites/variant";
|
||||||
import type { StarterDataEntry } from "#system/game-data";
|
import type { StarterDataEntry } from "#system/game-data";
|
||||||
import type { DexEntry } from "#types/dex-data";
|
import type { DexEntry } from "#types/dex-data";
|
||||||
import { ConfirmUiHandler } from "#ui/confirm-ui-handler";
|
import { ConfirmUiHandler } from "#ui/confirm-ui-handler";
|
||||||
import { StatsContainer } from "#ui/stats-container";
|
import { StatsContainer } from "#ui/stats-container";
|
||||||
import { addBBCodeTextObject, addTextObject, getTextColor, TextStyle } from "#ui/text";
|
import { addBBCodeTextObject, addTextObject, getTextColor } from "#ui/text";
|
||||||
import { addWindow } from "#ui/ui-theme";
|
import { addWindow } from "#ui/ui-theme";
|
||||||
import { fixedInt, getShinyDescriptor } from "#utils/common";
|
import { fixedInt, getShinyDescriptor } from "#utils/common";
|
||||||
import i18next from "i18next";
|
import i18next from "i18next";
|
||||||
|
@ -1,10 +1,11 @@
|
|||||||
import { pokerogueApi } from "#api/pokerogue-api";
|
import { pokerogueApi } from "#api/pokerogue-api";
|
||||||
import { globalScene } from "#app/global-scene";
|
import { globalScene } from "#app/global-scene";
|
||||||
|
import { TextStyle } from "#enums/text-style";
|
||||||
import { UiMode } from "#enums/ui-mode";
|
import { UiMode } from "#enums/ui-mode";
|
||||||
import type { InputFieldConfig } from "#ui/form-modal-ui-handler";
|
import type { InputFieldConfig } from "#ui/form-modal-ui-handler";
|
||||||
import { FormModalUiHandler } from "#ui/form-modal-ui-handler";
|
import { FormModalUiHandler } from "#ui/form-modal-ui-handler";
|
||||||
import type { ModalConfig } from "#ui/modal-ui-handler";
|
import type { ModalConfig } from "#ui/modal-ui-handler";
|
||||||
import { addTextObject, TextStyle } from "#ui/text";
|
import { addTextObject } from "#ui/text";
|
||||||
import i18next from "i18next";
|
import i18next from "i18next";
|
||||||
|
|
||||||
interface LanguageSetting {
|
interface LanguageSetting {
|
||||||
|
@ -3,13 +3,14 @@ import { BattleType } from "#enums/battle-type";
|
|||||||
import { Button } from "#enums/buttons";
|
import { Button } from "#enums/buttons";
|
||||||
import { GameModes } from "#enums/game-modes";
|
import { GameModes } from "#enums/game-modes";
|
||||||
import { PlayerGender } from "#enums/player-gender";
|
import { PlayerGender } from "#enums/player-gender";
|
||||||
|
import { TextStyle } from "#enums/text-style";
|
||||||
import { TrainerVariant } from "#enums/trainer-variant";
|
import { TrainerVariant } from "#enums/trainer-variant";
|
||||||
import { UiMode } from "#enums/ui-mode";
|
import { UiMode } from "#enums/ui-mode";
|
||||||
import type { RunEntry } from "#system/game-data";
|
import type { RunEntry } from "#system/game-data";
|
||||||
import type { PokemonData } from "#system/pokemon-data";
|
import type { PokemonData } from "#system/pokemon-data";
|
||||||
import { MessageUiHandler } from "#ui/message-ui-handler";
|
import { MessageUiHandler } from "#ui/message-ui-handler";
|
||||||
import { RunDisplayMode } from "#ui/run-info-ui-handler";
|
import { RunDisplayMode } from "#ui/run-info-ui-handler";
|
||||||
import { addTextObject, TextStyle } from "#ui/text";
|
import { addTextObject } from "#ui/text";
|
||||||
import { addWindow } from "#ui/ui-theme";
|
import { addWindow } from "#ui/ui-theme";
|
||||||
import { fixedInt, formatLargeNumber } from "#utils/common";
|
import { fixedInt, formatLargeNumber } from "#utils/common";
|
||||||
import i18next from "i18next";
|
import i18next from "i18next";
|
||||||
|
@ -12,6 +12,7 @@ import type { MysteryEncounterType } from "#enums/mystery-encounter-type";
|
|||||||
import { PlayerGender } from "#enums/player-gender";
|
import { PlayerGender } from "#enums/player-gender";
|
||||||
import { PokemonType } from "#enums/pokemon-type";
|
import { PokemonType } from "#enums/pokemon-type";
|
||||||
import type { SpeciesId } from "#enums/species-id";
|
import type { SpeciesId } from "#enums/species-id";
|
||||||
|
import { TextStyle } from "#enums/text-style";
|
||||||
import { TrainerVariant } from "#enums/trainer-variant";
|
import { TrainerVariant } from "#enums/trainer-variant";
|
||||||
import { UiMode } from "#enums/ui-mode";
|
import { UiMode } from "#enums/ui-mode";
|
||||||
// biome-ignore lint/performance/noNamespaceImport: See `src/system/game-data.ts`
|
// biome-ignore lint/performance/noNamespaceImport: See `src/system/game-data.ts`
|
||||||
@ -21,7 +22,7 @@ import { getVariantTint } from "#sprites/variant";
|
|||||||
import type { SessionSaveData } from "#system/game-data";
|
import type { SessionSaveData } from "#system/game-data";
|
||||||
import type { PokemonData } from "#system/pokemon-data";
|
import type { PokemonData } from "#system/pokemon-data";
|
||||||
import { SettingKeyboard } from "#system/settings-keyboard";
|
import { SettingKeyboard } from "#system/settings-keyboard";
|
||||||
import { addBBCodeTextObject, addTextObject, getTextColor, TextStyle } from "#ui/text";
|
import { addBBCodeTextObject, addTextObject, getTextColor } from "#ui/text";
|
||||||
import { UiHandler } from "#ui/ui-handler";
|
import { UiHandler } from "#ui/ui-handler";
|
||||||
import { addWindow } from "#ui/ui-theme";
|
import { addWindow } from "#ui/ui-theme";
|
||||||
import { formatFancyLargeNumber, formatLargeNumber, formatMoney, getPlayTimeString } from "#utils/common";
|
import { formatFancyLargeNumber, formatLargeNumber, formatMoney, getPlayTimeString } from "#utils/common";
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
import { GameMode } from "#app/game-mode";
|
import { GameMode } from "#app/game-mode";
|
||||||
import { globalScene } from "#app/global-scene";
|
import { globalScene } from "#app/global-scene";
|
||||||
import { Button } from "#enums/buttons";
|
import { Button } from "#enums/buttons";
|
||||||
|
import { TextStyle } from "#enums/text-style";
|
||||||
import { UiMode } from "#enums/ui-mode";
|
import { UiMode } from "#enums/ui-mode";
|
||||||
// biome-ignore lint/performance/noNamespaceImport: See `src/system/game-data.ts`
|
// biome-ignore lint/performance/noNamespaceImport: See `src/system/game-data.ts`
|
||||||
import * as Modifier from "#modifiers/modifier";
|
import * as Modifier from "#modifiers/modifier";
|
||||||
@ -8,7 +9,7 @@ import type { SessionSaveData } from "#system/game-data";
|
|||||||
import type { PokemonData } from "#system/pokemon-data";
|
import type { PokemonData } from "#system/pokemon-data";
|
||||||
import { MessageUiHandler } from "#ui/message-ui-handler";
|
import { MessageUiHandler } from "#ui/message-ui-handler";
|
||||||
import { RunDisplayMode } from "#ui/run-info-ui-handler";
|
import { RunDisplayMode } from "#ui/run-info-ui-handler";
|
||||||
import { addTextObject, TextStyle } from "#ui/text";
|
import { addTextObject } from "#ui/text";
|
||||||
import { addWindow } from "#ui/ui-theme";
|
import { addWindow } from "#ui/ui-theme";
|
||||||
import { fixedInt, formatLargeNumber, getPlayTimeString, isNullOrUndefined } from "#utils/common";
|
import { fixedInt, formatLargeNumber, getPlayTimeString, isNullOrUndefined } from "#utils/common";
|
||||||
import i18next from "i18next";
|
import i18next from "i18next";
|
||||||
|
@ -1,7 +1,8 @@
|
|||||||
|
import { TextStyle } from "#enums/text-style";
|
||||||
import type { UiMode } from "#enums/ui-mode";
|
import type { UiMode } from "#enums/ui-mode";
|
||||||
import type { ModalConfig } from "#ui/modal-ui-handler";
|
import type { ModalConfig } from "#ui/modal-ui-handler";
|
||||||
import { ModalUiHandler } from "#ui/modal-ui-handler";
|
import { ModalUiHandler } from "#ui/modal-ui-handler";
|
||||||
import { addTextObject, TextStyle } from "#ui/text";
|
import { addTextObject } from "#ui/text";
|
||||||
|
|
||||||
export class SessionReloadModalUiHandler extends ModalUiHandler {
|
export class SessionReloadModalUiHandler extends ModalUiHandler {
|
||||||
constructor(mode: UiMode | null = null) {
|
constructor(mode: UiMode | null = null) {
|
||||||
|
@ -1,8 +1,9 @@
|
|||||||
import { globalScene } from "#app/global-scene";
|
import { globalScene } from "#app/global-scene";
|
||||||
import { Button } from "#enums/buttons";
|
import { Button } from "#enums/buttons";
|
||||||
|
import { TextStyle } from "#enums/text-style";
|
||||||
import type { UiMode } from "#enums/ui-mode";
|
import type { UiMode } from "#enums/ui-mode";
|
||||||
import { NavigationManager } from "#ui/navigation-menu";
|
import { NavigationManager } from "#ui/navigation-menu";
|
||||||
import { addTextObject, TextStyle } from "#ui/text";
|
import { addTextObject } from "#ui/text";
|
||||||
import { UiHandler } from "#ui/ui-handler";
|
import { UiHandler } from "#ui/ui-handler";
|
||||||
import { addWindow } from "#ui/ui-theme";
|
import { addWindow } from "#ui/ui-theme";
|
||||||
import i18next from "i18next";
|
import i18next from "i18next";
|
||||||
|
@ -2,11 +2,12 @@ import { globalScene } from "#app/global-scene";
|
|||||||
import type { InterfaceConfig } from "#app/inputs-controller";
|
import type { InterfaceConfig } from "#app/inputs-controller";
|
||||||
import { Button } from "#enums/buttons";
|
import { Button } from "#enums/buttons";
|
||||||
import type { Device } from "#enums/devices";
|
import type { Device } from "#enums/devices";
|
||||||
|
import { TextStyle } from "#enums/text-style";
|
||||||
import type { UiMode } from "#enums/ui-mode";
|
import type { UiMode } from "#enums/ui-mode";
|
||||||
import { getIconWithSettingName } from "#inputs/config-handler";
|
import { getIconWithSettingName } from "#inputs/config-handler";
|
||||||
import { NavigationManager, NavigationMenu } from "#ui/navigation-menu";
|
import { NavigationManager, NavigationMenu } from "#ui/navigation-menu";
|
||||||
import { ScrollBar } from "#ui/scroll-bar";
|
import { ScrollBar } from "#ui/scroll-bar";
|
||||||
import { addTextObject, TextStyle } from "#ui/text";
|
import { addTextObject } from "#ui/text";
|
||||||
import { UiHandler } from "#ui/ui-handler";
|
import { UiHandler } from "#ui/ui-handler";
|
||||||
import { addWindow } from "#ui/ui-theme";
|
import { addWindow } from "#ui/ui-theme";
|
||||||
import i18next from "i18next";
|
import i18next from "i18next";
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
import { globalScene } from "#app/global-scene";
|
import { globalScene } from "#app/global-scene";
|
||||||
import { Button } from "#enums/buttons";
|
import { Button } from "#enums/buttons";
|
||||||
|
import { TextStyle } from "#enums/text-style";
|
||||||
import { UiMode } from "#enums/ui-mode";
|
import { UiMode } from "#enums/ui-mode";
|
||||||
import type { SettingType } from "#system/settings";
|
import type { SettingType } from "#system/settings";
|
||||||
import { Setting, SettingKeys } from "#system/settings";
|
import { Setting, SettingKeys } from "#system/settings";
|
||||||
@ -7,7 +8,7 @@ import type { InputsIcons } from "#ui/abstract-control-settings-ui-handler";
|
|||||||
import { MessageUiHandler } from "#ui/message-ui-handler";
|
import { MessageUiHandler } from "#ui/message-ui-handler";
|
||||||
import { NavigationManager, NavigationMenu } from "#ui/navigation-menu";
|
import { NavigationManager, NavigationMenu } from "#ui/navigation-menu";
|
||||||
import { ScrollBar } from "#ui/scroll-bar";
|
import { ScrollBar } from "#ui/scroll-bar";
|
||||||
import { addTextObject, TextStyle } from "#ui/text";
|
import { addTextObject } from "#ui/text";
|
||||||
import { addWindow } from "#ui/ui-theme";
|
import { addWindow } from "#ui/ui-theme";
|
||||||
import i18next from "i18next";
|
import i18next from "i18next";
|
||||||
|
|
||||||
|
@ -1,9 +1,10 @@
|
|||||||
import { globalScene } from "#app/global-scene";
|
import { globalScene } from "#app/global-scene";
|
||||||
import { Device } from "#enums/devices";
|
import { Device } from "#enums/devices";
|
||||||
|
import { TextStyle } from "#enums/text-style";
|
||||||
import type { UiMode } from "#enums/ui-mode";
|
import type { UiMode } from "#enums/ui-mode";
|
||||||
import { getIconWithSettingName, getKeyWithKeycode } from "#inputs/config-handler";
|
import { getIconWithSettingName, getKeyWithKeycode } from "#inputs/config-handler";
|
||||||
import { AbstractBindingUiHandler } from "#ui/abstract-binding-ui-handler";
|
import { AbstractBindingUiHandler } from "#ui/abstract-binding-ui-handler";
|
||||||
import { addTextObject, TextStyle } from "#ui/text";
|
import { addTextObject } from "#ui/text";
|
||||||
import i18next from "i18next";
|
import i18next from "i18next";
|
||||||
|
|
||||||
export class GamepadBindingUiHandler extends AbstractBindingUiHandler {
|
export class GamepadBindingUiHandler extends AbstractBindingUiHandler {
|
||||||
|
@ -1,9 +1,10 @@
|
|||||||
import { globalScene } from "#app/global-scene";
|
import { globalScene } from "#app/global-scene";
|
||||||
import { Device } from "#enums/devices";
|
import { Device } from "#enums/devices";
|
||||||
|
import { TextStyle } from "#enums/text-style";
|
||||||
import type { UiMode } from "#enums/ui-mode";
|
import type { UiMode } from "#enums/ui-mode";
|
||||||
import { getKeyWithKeycode } from "#inputs/config-handler";
|
import { getKeyWithKeycode } from "#inputs/config-handler";
|
||||||
import { AbstractBindingUiHandler } from "#ui/abstract-binding-ui-handler";
|
import { AbstractBindingUiHandler } from "#ui/abstract-binding-ui-handler";
|
||||||
import { addTextObject, TextStyle } from "#ui/text";
|
import { addTextObject } from "#ui/text";
|
||||||
import i18next from "i18next";
|
import i18next from "i18next";
|
||||||
|
|
||||||
export class KeyboardBindingUiHandler extends AbstractBindingUiHandler {
|
export class KeyboardBindingUiHandler extends AbstractBindingUiHandler {
|
||||||
|
@ -1,8 +1,9 @@
|
|||||||
import { globalScene } from "#app/global-scene";
|
import { globalScene } from "#app/global-scene";
|
||||||
import { Button } from "#enums/buttons";
|
import { Button } from "#enums/buttons";
|
||||||
|
import { TextStyle } from "#enums/text-style";
|
||||||
import { UiMode } from "#enums/ui-mode";
|
import { UiMode } from "#enums/ui-mode";
|
||||||
import type { InputsIcons } from "#ui/abstract-control-settings-ui-handler";
|
import type { InputsIcons } from "#ui/abstract-control-settings-ui-handler";
|
||||||
import { addTextObject, setTextStyle, TextStyle } from "#ui/text";
|
import { addTextObject, setTextStyle } from "#ui/text";
|
||||||
import { addWindow } from "#ui/ui-theme";
|
import { addWindow } from "#ui/ui-theme";
|
||||||
import i18next from "i18next";
|
import i18next from "i18next";
|
||||||
|
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
import { globalScene } from "#app/global-scene";
|
import { globalScene } from "#app/global-scene";
|
||||||
import type { InterfaceConfig } from "#app/inputs-controller";
|
import type { InterfaceConfig } from "#app/inputs-controller";
|
||||||
import { Device } from "#enums/devices";
|
import { Device } from "#enums/devices";
|
||||||
|
import { TextStyle } from "#enums/text-style";
|
||||||
import type { UiMode } from "#enums/ui-mode";
|
import type { UiMode } from "#enums/ui-mode";
|
||||||
import pad_dualshock from "#inputs/pad-dualshock";
|
import pad_dualshock from "#inputs/pad-dualshock";
|
||||||
import pad_unlicensedSNES from "#inputs/pad-unlicensed-snes";
|
import pad_unlicensedSNES from "#inputs/pad-unlicensed-snes";
|
||||||
@ -13,7 +14,7 @@ import {
|
|||||||
settingGamepadOptions,
|
settingGamepadOptions,
|
||||||
} from "#system/settings-gamepad";
|
} from "#system/settings-gamepad";
|
||||||
import { AbstractControlSettingsUiHandler } from "#ui/abstract-control-settings-ui-handler";
|
import { AbstractControlSettingsUiHandler } from "#ui/abstract-control-settings-ui-handler";
|
||||||
import { addTextObject, TextStyle } from "#ui/text";
|
import { addTextObject } from "#ui/text";
|
||||||
import { truncateString } from "#utils/common";
|
import { truncateString } from "#utils/common";
|
||||||
import i18next from "i18next";
|
import i18next from "i18next";
|
||||||
|
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
import { globalScene } from "#app/global-scene";
|
import { globalScene } from "#app/global-scene";
|
||||||
import type { InterfaceConfig } from "#app/inputs-controller";
|
import type { InterfaceConfig } from "#app/inputs-controller";
|
||||||
import { Device } from "#enums/devices";
|
import { Device } from "#enums/devices";
|
||||||
|
import { TextStyle } from "#enums/text-style";
|
||||||
import { UiMode } from "#enums/ui-mode";
|
import { UiMode } from "#enums/ui-mode";
|
||||||
import cfg_keyboard_qwerty from "#inputs/cfg-keyboard-qwerty";
|
import cfg_keyboard_qwerty from "#inputs/cfg-keyboard-qwerty";
|
||||||
import { deleteBind } from "#inputs/config-handler";
|
import { deleteBind } from "#inputs/config-handler";
|
||||||
@ -13,7 +14,7 @@ import {
|
|||||||
} from "#system/settings-keyboard";
|
} from "#system/settings-keyboard";
|
||||||
import { AbstractControlSettingsUiHandler } from "#ui/abstract-control-settings-ui-handler";
|
import { AbstractControlSettingsUiHandler } from "#ui/abstract-control-settings-ui-handler";
|
||||||
import { NavigationManager } from "#ui/navigation-menu";
|
import { NavigationManager } from "#ui/navigation-menu";
|
||||||
import { addTextObject, TextStyle } from "#ui/text";
|
import { addTextObject } from "#ui/text";
|
||||||
import { reverseValueToKeySetting, truncateString } from "#utils/common";
|
import { reverseValueToKeySetting, truncateString } from "#utils/common";
|
||||||
import i18next from "i18next";
|
import i18next from "i18next";
|
||||||
|
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
import { globalScene } from "#app/global-scene";
|
import { globalScene } from "#app/global-scene";
|
||||||
import type { PokemonSpecies } from "#data/pokemon-species";
|
import type { PokemonSpecies } from "#data/pokemon-species";
|
||||||
import { addTextObject, TextStyle } from "#ui/text";
|
import { TextStyle } from "#enums/text-style";
|
||||||
|
import { addTextObject } from "#ui/text";
|
||||||
|
|
||||||
export class StarterContainer extends Phaser.GameObjects.Container {
|
export class StarterContainer extends Phaser.GameObjects.Container {
|
||||||
public species: PokemonSpecies;
|
public species: PokemonSpecies;
|
||||||
|
@ -39,6 +39,7 @@ import type { Nature } from "#enums/nature";
|
|||||||
import { Passive as PassiveAttr } from "#enums/passive";
|
import { Passive as PassiveAttr } from "#enums/passive";
|
||||||
import { PokemonType } from "#enums/pokemon-type";
|
import { PokemonType } from "#enums/pokemon-type";
|
||||||
import { SpeciesId } from "#enums/species-id";
|
import { SpeciesId } from "#enums/species-id";
|
||||||
|
import { TextStyle } from "#enums/text-style";
|
||||||
import { UiMode } from "#enums/ui-mode";
|
import { UiMode } from "#enums/ui-mode";
|
||||||
import type { CandyUpgradeNotificationChangedEvent } from "#events/battle-scene";
|
import type { CandyUpgradeNotificationChangedEvent } from "#events/battle-scene";
|
||||||
import { BattleSceneEventType } from "#events/battle-scene";
|
import { BattleSceneEventType } from "#events/battle-scene";
|
||||||
@ -57,7 +58,7 @@ import { PokemonIconAnimHandler, PokemonIconAnimMode } from "#ui/pokemon-icon-an
|
|||||||
import { ScrollBar } from "#ui/scroll-bar";
|
import { ScrollBar } from "#ui/scroll-bar";
|
||||||
import { StarterContainer } from "#ui/starter-container";
|
import { StarterContainer } from "#ui/starter-container";
|
||||||
import { StatsContainer } from "#ui/stats-container";
|
import { StatsContainer } from "#ui/stats-container";
|
||||||
import { addBBCodeTextObject, addTextObject, TextStyle } from "#ui/text";
|
import { addBBCodeTextObject, addTextObject } from "#ui/text";
|
||||||
import { addWindow } from "#ui/ui-theme";
|
import { addWindow } from "#ui/ui-theme";
|
||||||
import {
|
import {
|
||||||
BooleanHolder,
|
BooleanHolder,
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
import { globalScene } from "#app/global-scene";
|
import { globalScene } from "#app/global-scene";
|
||||||
import { getStatKey, PERMANENT_STATS } from "#enums/stat";
|
import { getStatKey, PERMANENT_STATS } from "#enums/stat";
|
||||||
import { addBBCodeTextObject, addTextObject, getTextColor, TextStyle } from "#ui/text";
|
import { TextStyle } from "#enums/text-style";
|
||||||
|
import { addBBCodeTextObject, addTextObject, getTextColor } from "#ui/text";
|
||||||
import i18next from "i18next";
|
import i18next from "i18next";
|
||||||
import type BBCodeText from "phaser3-rex-plugins/plugins/gameobjects/tagtext/bbcodetext/BBCodeText";
|
import type BBCodeText from "phaser3-rex-plugins/plugins/gameobjects/tagtext/bbcodetext/BBCodeText";
|
||||||
|
|
||||||
|
@ -16,6 +16,7 @@ import { PlayerGender } from "#enums/player-gender";
|
|||||||
import { PokemonType } from "#enums/pokemon-type";
|
import { PokemonType } from "#enums/pokemon-type";
|
||||||
import { getStatKey, PERMANENT_STATS, Stat } from "#enums/stat";
|
import { getStatKey, PERMANENT_STATS, Stat } from "#enums/stat";
|
||||||
import { StatusEffect } from "#enums/status-effect";
|
import { StatusEffect } from "#enums/status-effect";
|
||||||
|
import { TextStyle } from "#enums/text-style";
|
||||||
import { UiMode } from "#enums/ui-mode";
|
import { UiMode } from "#enums/ui-mode";
|
||||||
import type { PlayerPokemon } from "#field/pokemon";
|
import type { PlayerPokemon } from "#field/pokemon";
|
||||||
import { modifierSortFunc, PokemonHeldItemModifier } from "#modifiers/modifier";
|
import { modifierSortFunc, PokemonHeldItemModifier } from "#modifiers/modifier";
|
||||||
@ -24,7 +25,7 @@ import type { PokemonMove } from "#moves/pokemon-move";
|
|||||||
import type { Variant } from "#sprites/variant";
|
import type { Variant } from "#sprites/variant";
|
||||||
import { getVariantTint } from "#sprites/variant";
|
import { getVariantTint } from "#sprites/variant";
|
||||||
import { achvs } from "#system/achv";
|
import { achvs } from "#system/achv";
|
||||||
import { addBBCodeTextObject, addTextObject, getBBCodeFrag, TextStyle } from "#ui/text";
|
import { addBBCodeTextObject, addTextObject, getBBCodeFrag } from "#ui/text";
|
||||||
import { UiHandler } from "#ui/ui-handler";
|
import { UiHandler } from "#ui/ui-handler";
|
||||||
import {
|
import {
|
||||||
fixedInt,
|
fixedInt,
|
||||||
|
@ -1,79 +1,14 @@
|
|||||||
import { globalScene } from "#app/global-scene";
|
import { globalScene } from "#app/global-scene";
|
||||||
import { EggTier } from "#enums/egg-type";
|
import { EggTier } from "#enums/egg-type";
|
||||||
import { ModifierTier } from "#enums/modifier-tier";
|
import { ModifierTier } from "#enums/modifier-tier";
|
||||||
|
import { TextStyle } from "#enums/text-style";
|
||||||
import { UiTheme } from "#enums/ui-theme";
|
import { UiTheme } from "#enums/ui-theme";
|
||||||
import i18next from "#plugins/i18n";
|
import i18next from "#plugins/i18n";
|
||||||
|
import type { TextStyleOptions } from "#types/ui";
|
||||||
import type Phaser from "phaser";
|
import type Phaser from "phaser";
|
||||||
import BBCodeText from "phaser3-rex-plugins/plugins/gameobjects/tagtext/bbcodetext/BBCodeText";
|
import BBCodeText from "phaser3-rex-plugins/plugins/gameobjects/tagtext/bbcodetext/BBCodeText";
|
||||||
import type InputText from "phaser3-rex-plugins/plugins/inputtext";
|
import type InputText from "phaser3-rex-plugins/plugins/inputtext";
|
||||||
|
|
||||||
export enum TextStyle {
|
|
||||||
MESSAGE,
|
|
||||||
WINDOW,
|
|
||||||
WINDOW_ALT,
|
|
||||||
WINDOW_BATTLE_COMMAND,
|
|
||||||
BATTLE_INFO,
|
|
||||||
PARTY,
|
|
||||||
PARTY_RED,
|
|
||||||
PARTY_CANCEL_BUTTON,
|
|
||||||
INSTRUCTIONS_TEXT,
|
|
||||||
MOVE_LABEL,
|
|
||||||
SUMMARY,
|
|
||||||
SUMMARY_DEX_NUM,
|
|
||||||
SUMMARY_DEX_NUM_GOLD,
|
|
||||||
SUMMARY_ALT,
|
|
||||||
SUMMARY_HEADER,
|
|
||||||
SUMMARY_RED,
|
|
||||||
SUMMARY_BLUE,
|
|
||||||
SUMMARY_PINK,
|
|
||||||
SUMMARY_GOLD,
|
|
||||||
SUMMARY_GRAY,
|
|
||||||
SUMMARY_GREEN,
|
|
||||||
SUMMARY_STATS,
|
|
||||||
SUMMARY_STATS_BLUE,
|
|
||||||
SUMMARY_STATS_PINK,
|
|
||||||
SUMMARY_STATS_GOLD,
|
|
||||||
LUCK_VALUE,
|
|
||||||
STATS_HEXAGON,
|
|
||||||
GROWTH_RATE_TYPE,
|
|
||||||
MONEY, // Money default styling (pale yellow)
|
|
||||||
MONEY_WINDOW, // Money displayed in Windows (needs different colors based on theme)
|
|
||||||
HEADER_LABEL,
|
|
||||||
STATS_LABEL,
|
|
||||||
STATS_VALUE,
|
|
||||||
SETTINGS_VALUE,
|
|
||||||
SETTINGS_LABEL,
|
|
||||||
SETTINGS_LABEL_NAVBAR,
|
|
||||||
SETTINGS_SELECTED,
|
|
||||||
SETTINGS_LOCKED,
|
|
||||||
EGG_LIST,
|
|
||||||
EGG_SUMMARY_NAME,
|
|
||||||
EGG_SUMMARY_DEX,
|
|
||||||
STARTER_VALUE_LIMIT,
|
|
||||||
TOOLTIP_TITLE,
|
|
||||||
TOOLTIP_CONTENT,
|
|
||||||
FILTER_BAR_MAIN,
|
|
||||||
MOVE_INFO_CONTENT,
|
|
||||||
MOVE_PP_FULL,
|
|
||||||
MOVE_PP_HALF_FULL,
|
|
||||||
MOVE_PP_NEAR_EMPTY,
|
|
||||||
MOVE_PP_EMPTY,
|
|
||||||
SMALLER_WINDOW_ALT,
|
|
||||||
BGM_BAR,
|
|
||||||
PERFECT_IV,
|
|
||||||
ME_OPTION_DEFAULT, // Default style for choices in ME
|
|
||||||
ME_OPTION_SPECIAL, // Style for choices with special requirements in ME
|
|
||||||
SHADOW_TEXT, // To obscure unavailable options
|
|
||||||
}
|
|
||||||
|
|
||||||
export interface TextStyleOptions {
|
|
||||||
scale: number;
|
|
||||||
styleOptions: Phaser.Types.GameObjects.Text.TextStyle | InputText.IConfig;
|
|
||||||
shadowColor: string;
|
|
||||||
shadowXpos: number;
|
|
||||||
shadowYpos: number;
|
|
||||||
}
|
|
||||||
|
|
||||||
export function addTextObject(
|
export function addTextObject(
|
||||||
x: number,
|
x: number,
|
||||||
y: number,
|
y: number,
|
||||||
@ -87,9 +22,10 @@ export function addTextObject(
|
|||||||
extraStyleOptions,
|
extraStyleOptions,
|
||||||
);
|
);
|
||||||
|
|
||||||
const ret = globalScene.add.text(x, y, content, styleOptions);
|
const ret = globalScene.add
|
||||||
ret.setScale(scale);
|
.text(x, y, content, styleOptions)
|
||||||
ret.setShadow(shadowXpos, shadowYpos, shadowColor);
|
.setScale(scale)
|
||||||
|
.setShadow(shadowXpos, shadowYpos, shadowColor);
|
||||||
if (!(styleOptions as Phaser.Types.GameObjects.Text.TextStyle).lineSpacing) {
|
if (!(styleOptions as Phaser.Types.GameObjects.Text.TextStyle).lineSpacing) {
|
||||||
ret.setLineSpacing(scale * 30);
|
ret.setLineSpacing(scale * 30);
|
||||||
}
|
}
|
||||||
@ -107,8 +43,7 @@ export function setTextStyle(
|
|||||||
globalScene.uiTheme,
|
globalScene.uiTheme,
|
||||||
extraStyleOptions,
|
extraStyleOptions,
|
||||||
);
|
);
|
||||||
obj.setScale(scale);
|
obj.setScale(scale).setShadow(shadowXpos, shadowYpos, shadowColor);
|
||||||
obj.setShadow(shadowXpos, shadowYpos, shadowColor);
|
|
||||||
if (!(styleOptions as Phaser.Types.GameObjects.Text.TextStyle).lineSpacing) {
|
if (!(styleOptions as Phaser.Types.GameObjects.Text.TextStyle).lineSpacing) {
|
||||||
obj.setLineSpacing(scale * 30);
|
obj.setLineSpacing(scale * 30);
|
||||||
}
|
}
|
||||||
@ -133,8 +68,7 @@ export function addBBCodeTextObject(
|
|||||||
|
|
||||||
const ret = new BBCodeText(globalScene, x, y, content, styleOptions as BBCodeText.TextStyle);
|
const ret = new BBCodeText(globalScene, x, y, content, styleOptions as BBCodeText.TextStyle);
|
||||||
globalScene.add.existing(ret);
|
globalScene.add.existing(ret);
|
||||||
ret.setScale(scale);
|
ret.setScale(scale).setShadow(shadowXpos, shadowYpos, shadowColor);
|
||||||
ret.setShadow(shadowXpos, shadowYpos, shadowColor);
|
|
||||||
if (!(styleOptions as BBCodeText.TextStyle).lineSpacing) {
|
if (!(styleOptions as BBCodeText.TextStyle).lineSpacing) {
|
||||||
ret.setLineSpacing(scale * 60);
|
ret.setLineSpacing(scale * 60);
|
||||||
}
|
}
|
||||||
|
@ -5,10 +5,11 @@ import { TimedEventDisplay } from "#app/timed-event-manager";
|
|||||||
import { getSplashMessages } from "#data/splash-messages";
|
import { getSplashMessages } from "#data/splash-messages";
|
||||||
import { PlayerGender } from "#enums/player-gender";
|
import { PlayerGender } from "#enums/player-gender";
|
||||||
import type { SpeciesId } from "#enums/species-id";
|
import type { SpeciesId } from "#enums/species-id";
|
||||||
|
import { TextStyle } from "#enums/text-style";
|
||||||
import { UiMode } from "#enums/ui-mode";
|
import { UiMode } from "#enums/ui-mode";
|
||||||
import { version } from "#package.json";
|
import { version } from "#package.json";
|
||||||
import { OptionSelectUiHandler } from "#ui/option-select-ui-handler";
|
import { OptionSelectUiHandler } from "#ui/option-select-ui-handler";
|
||||||
import { addTextObject, TextStyle } from "#ui/text";
|
import { addTextObject } from "#ui/text";
|
||||||
import { fixedInt, randInt, randItem } from "#utils/common";
|
import { fixedInt, randInt, randItem } from "#utils/common";
|
||||||
import { getPokemonSpecies } from "#utils/pokemon-utils";
|
import { getPokemonSpecies } from "#utils/pokemon-utils";
|
||||||
import i18next from "i18next";
|
import i18next from "i18next";
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
import { globalScene } from "#app/global-scene";
|
import { globalScene } from "#app/global-scene";
|
||||||
import type { Button } from "#enums/buttons";
|
import type { Button } from "#enums/buttons";
|
||||||
|
import type { TextStyle } from "#enums/text-style";
|
||||||
import type { UiMode } from "#enums/ui-mode";
|
import type { UiMode } from "#enums/ui-mode";
|
||||||
import type { TextStyle } from "#ui/text";
|
|
||||||
import { getTextColor } from "#ui/text";
|
import { getTextColor } from "#ui/text";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -2,6 +2,7 @@ import { globalScene } from "#app/global-scene";
|
|||||||
import type { Button } from "#enums/buttons";
|
import type { Button } from "#enums/buttons";
|
||||||
import { Device } from "#enums/devices";
|
import { Device } from "#enums/devices";
|
||||||
import { PlayerGender } from "#enums/player-gender";
|
import { PlayerGender } from "#enums/player-gender";
|
||||||
|
import { TextStyle } from "#enums/text-style";
|
||||||
import { UiMode } from "#enums/ui-mode";
|
import { UiMode } from "#enums/ui-mode";
|
||||||
import { AchvBar } from "#ui/achv-bar";
|
import { AchvBar } from "#ui/achv-bar";
|
||||||
import { AchvsUiHandler } from "#ui/achvs-ui-handler";
|
import { AchvsUiHandler } from "#ui/achvs-ui-handler";
|
||||||
@ -51,7 +52,7 @@ import { StarterSelectUiHandler } from "#ui/starter-select-ui-handler";
|
|||||||
import { SummaryUiHandler } from "#ui/summary-ui-handler";
|
import { SummaryUiHandler } from "#ui/summary-ui-handler";
|
||||||
import { TargetSelectUiHandler } from "#ui/target-select-ui-handler";
|
import { TargetSelectUiHandler } from "#ui/target-select-ui-handler";
|
||||||
import { TestDialogueUiHandler } from "#ui/test-dialogue-ui-handler";
|
import { TestDialogueUiHandler } from "#ui/test-dialogue-ui-handler";
|
||||||
import { addTextObject, TextStyle } from "#ui/text";
|
import { addTextObject } from "#ui/text";
|
||||||
import { TitleUiHandler } from "#ui/title-ui-handler";
|
import { TitleUiHandler } from "#ui/title-ui-handler";
|
||||||
import type { UiHandler } from "#ui/ui-handler";
|
import type { UiHandler } from "#ui/ui-handler";
|
||||||
import { addWindow } from "#ui/ui-theme";
|
import { addWindow } from "#ui/ui-theme";
|
||||||
|
@ -1,9 +1,10 @@
|
|||||||
import { updateUserInfo } from "#app/account";
|
import { updateUserInfo } from "#app/account";
|
||||||
import { globalScene } from "#app/global-scene";
|
import { globalScene } from "#app/global-scene";
|
||||||
|
import { TextStyle } from "#enums/text-style";
|
||||||
import type { UiMode } from "#enums/ui-mode";
|
import type { UiMode } from "#enums/ui-mode";
|
||||||
import type { ModalConfig } from "#ui/modal-ui-handler";
|
import type { ModalConfig } from "#ui/modal-ui-handler";
|
||||||
import { ModalUiHandler } from "#ui/modal-ui-handler";
|
import { ModalUiHandler } from "#ui/modal-ui-handler";
|
||||||
import { addTextObject, TextStyle } from "#ui/text";
|
import { addTextObject } from "#ui/text";
|
||||||
import { sessionIdKey } from "#utils/common";
|
import { sessionIdKey } from "#utils/common";
|
||||||
import { removeCookie } from "#utils/cookies";
|
import { removeCookie } from "#utils/cookies";
|
||||||
import i18next from "i18next";
|
import i18next from "i18next";
|
||||||
|
Loading…
Reference in New Issue
Block a user