mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-07-03 23:12:20 +02:00
Merge 3b22d29021
into 9926a6e799
This commit is contained in:
commit
acc6d4c5b2
Binary file not shown.
Binary file not shown.
BIN
public/fonts/pokemon-bw.ttf
Normal file
BIN
public/fonts/pokemon-bw.ttf
Normal file
Binary file not shown.
@ -65,28 +65,27 @@ const fonts: Array<LoadingFontFaceProperty> = [
|
|||||||
unicodeRange: rangesByLanguage.chinese,
|
unicodeRange: rangesByLanguage.chinese,
|
||||||
}),
|
}),
|
||||||
extraOptions: { sizeAdjust: "70%", format: "woff2" },
|
extraOptions: { sizeAdjust: "70%", format: "woff2" },
|
||||||
only: ["en", "es", "fr", "it", "de", "zh", "pt", "ko", "ca", "da", "tr", "ro", "ru"],
|
only: ["zh"],
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
face: new FontFace("pkmnems", "url(./fonts/unifont-15.1.05.subset.woff2)", {
|
face: new FontFace("pkmnems", "url(./fonts/unifont-15.1.05.subset.woff2)", {
|
||||||
unicodeRange: rangesByLanguage.chinese,
|
unicodeRange: rangesByLanguage.chinese,
|
||||||
}),
|
}),
|
||||||
extraOptions: { format: "woff2" },
|
extraOptions: { format: "woff2" },
|
||||||
only: ["en", "es", "fr", "it", "de", "zh", "pt", "ko", "ca", "da", "tr", "ro", "ru"],
|
only: ["zh"],
|
||||||
},
|
},
|
||||||
// japanese
|
// japanese
|
||||||
{
|
{
|
||||||
face: new FontFace("emerald", "url(./fonts/Galmuri11.subset.woff2)", {
|
face: new FontFace("emerald", "url(./fonts/pokemon-bw.ttf)", {
|
||||||
unicodeRange: rangesByLanguage.japanese,
|
unicodeRange: rangesByLanguage.japanese,
|
||||||
}),
|
}),
|
||||||
extraOptions: { sizeAdjust: "66%" },
|
only: ["en", "es", "fr", "it", "de", "pt", "ko", "ja", "ca", "da", "tr", "ro", "ru"],
|
||||||
only: ["ja"],
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
face: new FontFace("pkmnems", "url(./fonts/Galmuri9.subset.woff2)", {
|
face: new FontFace("pkmnems", "url(./fonts/pokemon-bw.ttf)", {
|
||||||
unicodeRange: rangesByLanguage.japanese,
|
unicodeRange: rangesByLanguage.japanese,
|
||||||
}),
|
}),
|
||||||
only: ["ja"],
|
only: ["en", "es", "fr", "it", "de", "pt", "ko", "ja", "ca", "da", "tr", "ro", "ru"],
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
|
|
||||||
|
@ -81,7 +81,7 @@ export default class AchvsUiHandler extends MessageUiHandler {
|
|||||||
|
|
||||||
this.headerBg = addWindow(0, 0, WIDTH - 2, 24);
|
this.headerBg = addWindow(0, 0, WIDTH - 2, 24);
|
||||||
|
|
||||||
this.headerText = addTextObject(0, 0, "", TextStyle.SETTINGS_LABEL)
|
this.headerText = addTextObject(0, 0, "", TextStyle.HEADER_LABEL)
|
||||||
.setOrigin(0)
|
.setOrigin(0)
|
||||||
.setPositionRelative(this.headerBg, 8, 4);
|
.setPositionRelative(this.headerBg, 8, 4);
|
||||||
this.headerActionButton = new Phaser.GameObjects.Sprite(globalScene, 0, 0, "keyboard", "ACTION.png")
|
this.headerActionButton = new Phaser.GameObjects.Sprite(globalScene, 0, 0, "keyboard", "ACTION.png")
|
||||||
|
@ -115,7 +115,7 @@ export default class BallUiHandler extends UiHandler {
|
|||||||
updateCounts() {
|
updateCounts() {
|
||||||
this.countsText.setText(
|
this.countsText.setText(
|
||||||
Object.values(globalScene.pokeballCounts)
|
Object.values(globalScene.pokeballCounts)
|
||||||
.map(c => `x${c}`)
|
.map(c => `×${c}`)
|
||||||
.join("\n"),
|
.join("\n"),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
@ -96,7 +96,6 @@ export default class BattleMessageUiHandler extends MessageUiHandler {
|
|||||||
const levelUpStatsLabelsContent = addTextObject(globalScene.game.canvas.width / 6 - 73, -94, "", TextStyle.WINDOW, {
|
const levelUpStatsLabelsContent = addTextObject(globalScene.game.canvas.width / 6 - 73, -94, "", TextStyle.WINDOW, {
|
||||||
maxLines: 6,
|
maxLines: 6,
|
||||||
});
|
});
|
||||||
levelUpStatsLabelsContent.setLineSpacing(i18next.resolvedLanguage === "ja" ? 25 : 5);
|
|
||||||
let levelUpStatsLabelText = "";
|
let levelUpStatsLabelText = "";
|
||||||
|
|
||||||
for (const s of PERMANENT_STATS) {
|
for (const s of PERMANENT_STATS) {
|
||||||
@ -123,7 +122,6 @@ export default class BattleMessageUiHandler extends MessageUiHandler {
|
|||||||
TextStyle.WINDOW,
|
TextStyle.WINDOW,
|
||||||
{ maxLines: 6 },
|
{ maxLines: 6 },
|
||||||
);
|
);
|
||||||
levelUpStatsIncrContent.setLineSpacing(i18next.resolvedLanguage === "ja" ? 25 : 5);
|
|
||||||
levelUpStatsContainer.add(levelUpStatsIncrContent);
|
levelUpStatsContainer.add(levelUpStatsIncrContent);
|
||||||
|
|
||||||
this.levelUpStatsIncrContent = levelUpStatsIncrContent;
|
this.levelUpStatsIncrContent = levelUpStatsIncrContent;
|
||||||
@ -135,7 +133,6 @@ export default class BattleMessageUiHandler extends MessageUiHandler {
|
|||||||
TextStyle.WINDOW,
|
TextStyle.WINDOW,
|
||||||
{ maxLines: 6, lineSpacing: 5 },
|
{ maxLines: 6, lineSpacing: 5 },
|
||||||
);
|
);
|
||||||
levelUpStatsValuesContent.setLineSpacing(i18next.resolvedLanguage === "ja" ? 25 : 5);
|
|
||||||
levelUpStatsValuesContent.setOrigin(1, 0);
|
levelUpStatsValuesContent.setOrigin(1, 0);
|
||||||
levelUpStatsValuesContent.setAlign("right");
|
levelUpStatsValuesContent.setAlign("right");
|
||||||
levelUpStatsContainer.add(levelUpStatsValuesContent);
|
levelUpStatsContainer.add(levelUpStatsValuesContent);
|
||||||
|
@ -82,7 +82,7 @@ export default class GameChallengesUiHandler extends UiHandler {
|
|||||||
headerBg.setName("window-header-bg");
|
headerBg.setName("window-header-bg");
|
||||||
headerBg.setOrigin(0, 0);
|
headerBg.setOrigin(0, 0);
|
||||||
|
|
||||||
const headerText = addTextObject(0, 0, i18next.t("challenges:title"), TextStyle.SETTINGS_LABEL);
|
const headerText = addTextObject(0, 0, i18next.t("challenges:title"), TextStyle.HEADER_LABEL);
|
||||||
headerText.setName("text-header");
|
headerText.setName("text-header");
|
||||||
headerText.setOrigin(0, 0);
|
headerText.setOrigin(0, 0);
|
||||||
headerText.setPositionRelative(headerBg, 8, 4);
|
headerText.setPositionRelative(headerBg, 8, 4);
|
||||||
|
@ -53,7 +53,12 @@ export default class CommandUiHandler extends UiHandler {
|
|||||||
this.commandsContainer.add(this.teraButton);
|
this.commandsContainer.add(this.teraButton);
|
||||||
|
|
||||||
for (let c = 0; c < commands.length; c++) {
|
for (let c = 0; c < commands.length; c++) {
|
||||||
const commandText = addTextObject(c % 2 === 0 ? 0 : 55.8, c < 2 ? 0 : 16, commands[c], TextStyle.WINDOW);
|
const commandText = addTextObject(
|
||||||
|
c % 2 === 0 ? 0 : 55.8,
|
||||||
|
c < 2 ? 0 : 16,
|
||||||
|
commands[c],
|
||||||
|
TextStyle.WINDOW_BATTLE_COMMAND,
|
||||||
|
);
|
||||||
commandText.setName(commands[c]);
|
commandText.setName(commands[c]);
|
||||||
this.commandsContainer.add(commandText);
|
this.commandsContainer.add(commandText);
|
||||||
}
|
}
|
||||||
|
@ -111,7 +111,7 @@ export default class EggGachaUiHandler extends MessageUiHandler {
|
|||||||
let pokemonIconX = -20;
|
let pokemonIconX = -20;
|
||||||
let pokemonIconY = 6;
|
let pokemonIconY = 6;
|
||||||
|
|
||||||
if (["de", "es-ES", "es-MX", "fr", "ko", "pt-BR", "ru"].includes(currentLanguage)) {
|
if (["de", "es-ES", "es-MX", "fr", "ko", "pt-BR", "ja", "ru"].includes(currentLanguage)) {
|
||||||
gachaTextStyle = TextStyle.SMALLER_WINDOW_ALT;
|
gachaTextStyle = TextStyle.SMALLER_WINDOW_ALT;
|
||||||
gachaX = 2;
|
gachaX = 2;
|
||||||
gachaY = 2;
|
gachaY = 2;
|
||||||
|
@ -49,11 +49,11 @@ export default class EggListUiHandler extends MessageUiHandler {
|
|||||||
|
|
||||||
this.eggNameText = addTextObject(8, 68, "", TextStyle.SUMMARY).setOrigin(0);
|
this.eggNameText = addTextObject(8, 68, "", TextStyle.SUMMARY).setOrigin(0);
|
||||||
|
|
||||||
this.eggDateText = addTextObject(8, 91, "", TextStyle.TOOLTIP_CONTENT);
|
this.eggDateText = addTextObject(8, 91, "", TextStyle.EGG_LIST);
|
||||||
|
|
||||||
this.eggHatchWavesText = addTextObject(8, 108, "", TextStyle.TOOLTIP_CONTENT).setWordWrapWidth(540);
|
this.eggHatchWavesText = addTextObject(8, 108, "", TextStyle.EGG_LIST).setWordWrapWidth(540);
|
||||||
|
|
||||||
this.eggGachaInfoText = addTextObject(8, 152, "", TextStyle.TOOLTIP_CONTENT).setWordWrapWidth(540);
|
this.eggGachaInfoText = addTextObject(8, 152, "", TextStyle.EGG_LIST).setWordWrapWidth(540);
|
||||||
|
|
||||||
this.eggListIconContainer = globalScene.add.container(113, 5);
|
this.eggListIconContainer = globalScene.add.container(113, 5);
|
||||||
|
|
||||||
|
@ -60,7 +60,7 @@ export class FilterBar extends Phaser.GameObjects.Container {
|
|||||||
|
|
||||||
this.columns.push(column);
|
this.columns.push(column);
|
||||||
|
|
||||||
const filterTypesLabel = addTextObject(0, 3, title, TextStyle.TOOLTIP_CONTENT);
|
const filterTypesLabel = addTextObject(0, 3, title, TextStyle.FILTER_BAR_MAIN);
|
||||||
this.labels.push(filterTypesLabel);
|
this.labels.push(filterTypesLabel);
|
||||||
this.add(filterTypesLabel);
|
this.add(filterTypesLabel);
|
||||||
this.dropDowns.push(dropDown);
|
this.dropDowns.push(dropDown);
|
||||||
|
@ -243,7 +243,7 @@ export default class GameStatsUiHandler extends UiHandler {
|
|||||||
const headerBg = addWindow(0, 0, globalScene.game.canvas.width / 6 - 2, 24);
|
const headerBg = addWindow(0, 0, globalScene.game.canvas.width / 6 - 2, 24);
|
||||||
headerBg.setOrigin(0, 0);
|
headerBg.setOrigin(0, 0);
|
||||||
|
|
||||||
const headerText = addTextObject(0, 0, i18next.t("gameStatsUiHandler:stats"), TextStyle.SETTINGS_LABEL);
|
const headerText = addTextObject(0, 0, i18next.t("gameStatsUiHandler:stats"), TextStyle.HEADER_LABEL);
|
||||||
headerText.setOrigin(0, 0);
|
headerText.setOrigin(0, 0);
|
||||||
headerText.setPositionRelative(headerBg, 8, 4);
|
headerText.setPositionRelative(headerBg, 8, 4);
|
||||||
|
|
||||||
|
@ -80,7 +80,6 @@ export default class MoveInfoOverlay extends Phaser.GameObjects.Container implem
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
this.desc.setLineSpacing(i18next.resolvedLanguage === "ja" ? 25 : 5);
|
|
||||||
|
|
||||||
// limit the text rendering, required for scrolling later on
|
// limit the text rendering, required for scrolling later on
|
||||||
const maskPointOrigin = {
|
const maskPointOrigin = {
|
||||||
|
@ -517,7 +517,7 @@ export default class MysteryEncounterUiHandler extends UiHandler {
|
|||||||
|
|
||||||
descriptionTextObject.setMask(abilityDescriptionTextMask);
|
descriptionTextObject.setMask(abilityDescriptionTextMask);
|
||||||
|
|
||||||
const descriptionLineCount = Math.floor(descriptionTextObject.displayHeight / 10);
|
const descriptionLineCount = Math.floor(descriptionTextObject.displayHeight / 9.2);
|
||||||
|
|
||||||
if (this.descriptionScrollTween) {
|
if (this.descriptionScrollTween) {
|
||||||
this.descriptionScrollTween.remove();
|
this.descriptionScrollTween.remove();
|
||||||
@ -614,6 +614,8 @@ export default class MysteryEncounterUiHandler extends UiHandler {
|
|||||||
const tooltipTextObject = addBBCodeTextObject(6, 7, text, TextStyle.TOOLTIP_CONTENT, {
|
const tooltipTextObject = addBBCodeTextObject(6, 7, text, TextStyle.TOOLTIP_CONTENT, {
|
||||||
wordWrap: { width: 600 },
|
wordWrap: { width: 600 },
|
||||||
fontSize: "72px",
|
fontSize: "72px",
|
||||||
|
padding: { top: 8 },
|
||||||
|
lineSpacing: 1.25,
|
||||||
});
|
});
|
||||||
this.tooltipContainer.add(tooltipTextObject);
|
this.tooltipContainer.add(tooltipTextObject);
|
||||||
|
|
||||||
@ -627,7 +629,7 @@ export default class MysteryEncounterUiHandler extends UiHandler {
|
|||||||
const textMask = tooltipTextMaskRect.createGeometryMask();
|
const textMask = tooltipTextMaskRect.createGeometryMask();
|
||||||
tooltipTextObject.setMask(textMask);
|
tooltipTextObject.setMask(textMask);
|
||||||
|
|
||||||
const tooltipLineCount = Math.floor(tooltipTextObject.displayHeight / 11.2);
|
const tooltipLineCount = Math.floor(tooltipTextObject.displayHeight / 10.2);
|
||||||
|
|
||||||
if (this.tooltipScrollTween) {
|
if (this.tooltipScrollTween) {
|
||||||
this.tooltipScrollTween.remove();
|
this.tooltipScrollTween.remove();
|
||||||
|
@ -1938,7 +1938,7 @@ class PartyCancelButton extends Phaser.GameObjects.Container {
|
|||||||
|
|
||||||
this.partyCancelPb = partyCancelPb;
|
this.partyCancelPb = partyCancelPb;
|
||||||
|
|
||||||
const partyCancelText = addTextObject(-8, -7, i18next.t("partyUiHandler:cancel"), TextStyle.PARTY);
|
const partyCancelText = addTextObject(-10, -7, i18next.t("partyUiHandler:cancel"), TextStyle.PARTY_CANCEL_BUTTON);
|
||||||
this.add(partyCancelText);
|
this.add(partyCancelText);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2,7 +2,6 @@ import type { InfoToggle } from "../battle-scene";
|
|||||||
import { TextStyle, addTextObject } from "./text";
|
import { TextStyle, addTextObject } from "./text";
|
||||||
import { addWindow } from "./ui-theme";
|
import { addWindow } from "./ui-theme";
|
||||||
import { fixedInt } from "#app/utils/common";
|
import { fixedInt } from "#app/utils/common";
|
||||||
import i18next from "i18next";
|
|
||||||
import { globalScene } from "#app/global-scene";
|
import { globalScene } from "#app/global-scene";
|
||||||
|
|
||||||
export interface PokedexInfoOverlaySettings {
|
export interface PokedexInfoOverlaySettings {
|
||||||
@ -55,7 +54,6 @@ export default class PokedexInfoOverlay extends Phaser.GameObjects.Container imp
|
|||||||
this.desc = addTextObject(BORDER, BORDER - 2, "", TextStyle.BATTLE_INFO, {
|
this.desc = addTextObject(BORDER, BORDER - 2, "", TextStyle.BATTLE_INFO, {
|
||||||
wordWrap: { width: (this.width - (BORDER - 2) * 2) * GLOBAL_SCALE },
|
wordWrap: { width: (this.width - (BORDER - 2) * 2) * GLOBAL_SCALE },
|
||||||
});
|
});
|
||||||
this.desc.setLineSpacing(i18next.resolvedLanguage === "ja" ? 25 : 5);
|
|
||||||
|
|
||||||
// limit the text rendering, required for scrolling later on
|
// limit the text rendering, required for scrolling later on
|
||||||
this.maskPointOriginX = options?.x || 0;
|
this.maskPointOriginX = options?.x || 0;
|
||||||
|
@ -82,13 +82,21 @@ const languageSettings: { [key: string]: LanguageSetting } = {
|
|||||||
instructionTextSize: "38px",
|
instructionTextSize: "38px",
|
||||||
},
|
},
|
||||||
de: {
|
de: {
|
||||||
starterInfoTextSize: "48px",
|
starterInfoTextSize: "54px",
|
||||||
instructionTextSize: "35px",
|
instructionTextSize: "35px",
|
||||||
starterInfoXPos: 33,
|
starterInfoXPos: 35,
|
||||||
},
|
},
|
||||||
"es-ES": {
|
"es-ES": {
|
||||||
starterInfoTextSize: "56px",
|
starterInfoTextSize: "50px",
|
||||||
instructionTextSize: "35px",
|
instructionTextSize: "38px",
|
||||||
|
starterInfoYOffset: 0.5,
|
||||||
|
starterInfoXPos: 38,
|
||||||
|
},
|
||||||
|
"es-MX": {
|
||||||
|
starterInfoTextSize: "50px",
|
||||||
|
instructionTextSize: "38px",
|
||||||
|
starterInfoYOffset: 0.5,
|
||||||
|
starterInfoXPos: 38,
|
||||||
},
|
},
|
||||||
fr: {
|
fr: {
|
||||||
starterInfoTextSize: "54px",
|
starterInfoTextSize: "54px",
|
||||||
@ -98,34 +106,53 @@ const languageSettings: { [key: string]: LanguageSetting } = {
|
|||||||
starterInfoTextSize: "56px",
|
starterInfoTextSize: "56px",
|
||||||
instructionTextSize: "38px",
|
instructionTextSize: "38px",
|
||||||
},
|
},
|
||||||
pt_BR: {
|
"pt-BR": {
|
||||||
starterInfoTextSize: "47px",
|
starterInfoTextSize: "48px",
|
||||||
instructionTextSize: "38px",
|
instructionTextSize: "42px",
|
||||||
|
starterInfoYOffset: 0.5,
|
||||||
starterInfoXPos: 33,
|
starterInfoXPos: 33,
|
||||||
},
|
},
|
||||||
zh: {
|
zh: {
|
||||||
starterInfoTextSize: "47px",
|
starterInfoTextSize: "56px",
|
||||||
instructionTextSize: "38px",
|
instructionTextSize: "36px",
|
||||||
starterInfoYOffset: 1,
|
starterInfoXPos: 26,
|
||||||
starterInfoXPos: 24,
|
|
||||||
},
|
|
||||||
pt: {
|
|
||||||
starterInfoTextSize: "48px",
|
|
||||||
instructionTextSize: "42px",
|
|
||||||
starterInfoXPos: 33,
|
|
||||||
},
|
},
|
||||||
ko: {
|
ko: {
|
||||||
starterInfoTextSize: "52px",
|
starterInfoTextSize: "60px",
|
||||||
instructionTextSize: "38px",
|
instructionTextSize: "38px",
|
||||||
|
starterInfoYOffset: -0.5,
|
||||||
|
starterInfoXPos: 30,
|
||||||
},
|
},
|
||||||
ja: {
|
ja: {
|
||||||
starterInfoTextSize: "51px",
|
starterInfoTextSize: "48px",
|
||||||
instructionTextSize: "38px",
|
instructionTextSize: "40px",
|
||||||
|
starterInfoYOffset: 1,
|
||||||
|
starterInfoXPos: 32,
|
||||||
},
|
},
|
||||||
"ca-ES": {
|
ca: {
|
||||||
|
starterInfoTextSize: "48px",
|
||||||
|
instructionTextSize: "38px",
|
||||||
|
starterInfoYOffset: 0.5,
|
||||||
|
starterInfoXPos: 29,
|
||||||
|
},
|
||||||
|
da: {
|
||||||
starterInfoTextSize: "56px",
|
starterInfoTextSize: "56px",
|
||||||
instructionTextSize: "38px",
|
instructionTextSize: "38px",
|
||||||
},
|
},
|
||||||
|
tr: {
|
||||||
|
starterInfoTextSize: "56px",
|
||||||
|
instructionTextSize: "38px",
|
||||||
|
},
|
||||||
|
ro: {
|
||||||
|
starterInfoTextSize: "56px",
|
||||||
|
instructionTextSize: "38px",
|
||||||
|
},
|
||||||
|
ru: {
|
||||||
|
starterInfoTextSize: "46px",
|
||||||
|
instructionTextSize: "38px",
|
||||||
|
starterInfoYOffset: 0.5,
|
||||||
|
starterInfoXPos: 26,
|
||||||
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
const valueReductionMax = 2;
|
const valueReductionMax = 2;
|
||||||
@ -309,7 +336,7 @@ export default class PokedexPageUiHandler extends MessageUiHandler {
|
|||||||
this.shinyOverlay.setVisible(false);
|
this.shinyOverlay.setVisible(false);
|
||||||
this.starterSelectContainer.add(this.shinyOverlay);
|
this.starterSelectContainer.add(this.shinyOverlay);
|
||||||
|
|
||||||
this.pokemonNumberText = addTextObject(17, 1, "0000", TextStyle.SUMMARY);
|
this.pokemonNumberText = addTextObject(17, 1, "0000", TextStyle.SUMMARY_DEX_NUM);
|
||||||
this.pokemonNumberText.setOrigin(0, 0);
|
this.pokemonNumberText.setOrigin(0, 0);
|
||||||
this.starterSelectContainer.add(this.pokemonNumberText);
|
this.starterSelectContainer.add(this.pokemonNumberText);
|
||||||
|
|
||||||
@ -328,7 +355,7 @@ export default class PokedexPageUiHandler extends MessageUiHandler {
|
|||||||
this.pokemonGrowthRateLabelText.setVisible(false);
|
this.pokemonGrowthRateLabelText.setVisible(false);
|
||||||
this.starterSelectContainer.add(this.pokemonGrowthRateLabelText);
|
this.starterSelectContainer.add(this.pokemonGrowthRateLabelText);
|
||||||
|
|
||||||
this.pokemonGrowthRateText = addTextObject(34, 106, "", TextStyle.SUMMARY_PINK, { fontSize: "36px" });
|
this.pokemonGrowthRateText = addTextObject(34, 106, "", TextStyle.GROWTH_RATE_TYPE, { fontSize: "36px" });
|
||||||
this.pokemonGrowthRateText.setOrigin(0, 0);
|
this.pokemonGrowthRateText.setOrigin(0, 0);
|
||||||
this.starterSelectContainer.add(this.pokemonGrowthRateText);
|
this.starterSelectContainer.add(this.pokemonGrowthRateText);
|
||||||
|
|
||||||
@ -371,9 +398,15 @@ export default class PokedexPageUiHandler extends MessageUiHandler {
|
|||||||
this.pokemonLuckLabelText.setOrigin(0, 0);
|
this.pokemonLuckLabelText.setOrigin(0, 0);
|
||||||
this.starterSelectContainer.add(this.pokemonLuckLabelText);
|
this.starterSelectContainer.add(this.pokemonLuckLabelText);
|
||||||
|
|
||||||
this.pokemonLuckText = addTextObject(8 + this.pokemonLuckLabelText.displayWidth + 2, 89, "0", TextStyle.WINDOW, {
|
this.pokemonLuckText = addTextObject(
|
||||||
|
8 + this.pokemonLuckLabelText.displayWidth + 2,
|
||||||
|
89,
|
||||||
|
"0",
|
||||||
|
TextStyle.LUCK_VALUE,
|
||||||
|
{
|
||||||
fontSize: "56px",
|
fontSize: "56px",
|
||||||
});
|
},
|
||||||
|
);
|
||||||
this.pokemonLuckText.setOrigin(0, 0);
|
this.pokemonLuckText.setOrigin(0, 0);
|
||||||
this.starterSelectContainer.add(this.pokemonLuckText);
|
this.starterSelectContainer.add(this.pokemonLuckText);
|
||||||
|
|
||||||
@ -470,7 +503,7 @@ export default class PokedexPageUiHandler extends MessageUiHandler {
|
|||||||
this.instructionRowX + this.instructionRowTextOffset,
|
this.instructionRowX + this.instructionRowTextOffset,
|
||||||
this.instructionRowY,
|
this.instructionRowY,
|
||||||
i18next.t("pokedexUiHandler:candyUpgrade"),
|
i18next.t("pokedexUiHandler:candyUpgrade"),
|
||||||
TextStyle.PARTY,
|
TextStyle.INSTRUCTIONS_TEXT,
|
||||||
{ fontSize: instructionTextSize },
|
{ fontSize: instructionTextSize },
|
||||||
);
|
);
|
||||||
this.candyUpgradeLabel.setName("text-candyUpgrade-label");
|
this.candyUpgradeLabel.setName("text-candyUpgrade-label");
|
||||||
@ -491,7 +524,7 @@ export default class PokedexPageUiHandler extends MessageUiHandler {
|
|||||||
this.instructionRowX + this.instructionRowTextOffset,
|
this.instructionRowX + this.instructionRowTextOffset,
|
||||||
this.instructionRowY,
|
this.instructionRowY,
|
||||||
i18next.t("pokedexUiHandler:cycleShiny"),
|
i18next.t("pokedexUiHandler:cycleShiny"),
|
||||||
TextStyle.PARTY,
|
TextStyle.INSTRUCTIONS_TEXT,
|
||||||
{ fontSize: instructionTextSize },
|
{ fontSize: instructionTextSize },
|
||||||
);
|
);
|
||||||
this.shinyLabel.setName("text-shiny-label");
|
this.shinyLabel.setName("text-shiny-label");
|
||||||
@ -510,7 +543,7 @@ export default class PokedexPageUiHandler extends MessageUiHandler {
|
|||||||
this.instructionRowX + this.instructionRowTextOffset,
|
this.instructionRowX + this.instructionRowTextOffset,
|
||||||
this.instructionRowY,
|
this.instructionRowY,
|
||||||
i18next.t("pokedexUiHandler:cycleForm"),
|
i18next.t("pokedexUiHandler:cycleForm"),
|
||||||
TextStyle.PARTY,
|
TextStyle.INSTRUCTIONS_TEXT,
|
||||||
{ fontSize: instructionTextSize },
|
{ fontSize: instructionTextSize },
|
||||||
);
|
);
|
||||||
this.formLabel.setName("text-form-label");
|
this.formLabel.setName("text-form-label");
|
||||||
@ -529,7 +562,7 @@ export default class PokedexPageUiHandler extends MessageUiHandler {
|
|||||||
this.instructionRowX + this.instructionRowTextOffset,
|
this.instructionRowX + this.instructionRowTextOffset,
|
||||||
this.instructionRowY,
|
this.instructionRowY,
|
||||||
i18next.t("pokedexUiHandler:cycleGender"),
|
i18next.t("pokedexUiHandler:cycleGender"),
|
||||||
TextStyle.PARTY,
|
TextStyle.INSTRUCTIONS_TEXT,
|
||||||
{ fontSize: instructionTextSize },
|
{ fontSize: instructionTextSize },
|
||||||
);
|
);
|
||||||
this.genderLabel.setName("text-gender-label");
|
this.genderLabel.setName("text-gender-label");
|
||||||
@ -548,7 +581,7 @@ export default class PokedexPageUiHandler extends MessageUiHandler {
|
|||||||
this.instructionRowX + this.instructionRowTextOffset,
|
this.instructionRowX + this.instructionRowTextOffset,
|
||||||
this.instructionRowY,
|
this.instructionRowY,
|
||||||
i18next.t("pokedexUiHandler:cycleVariant"),
|
i18next.t("pokedexUiHandler:cycleVariant"),
|
||||||
TextStyle.PARTY,
|
TextStyle.INSTRUCTIONS_TEXT,
|
||||||
{ fontSize: instructionTextSize },
|
{ fontSize: instructionTextSize },
|
||||||
);
|
);
|
||||||
this.variantLabel.setName("text-variant-label");
|
this.variantLabel.setName("text-variant-label");
|
||||||
@ -557,9 +590,15 @@ export default class PokedexPageUiHandler extends MessageUiHandler {
|
|||||||
this.showBackSpriteIconElement.setName("show-backSprite-icon-element");
|
this.showBackSpriteIconElement.setName("show-backSprite-icon-element");
|
||||||
this.showBackSpriteIconElement.setScale(0.675);
|
this.showBackSpriteIconElement.setScale(0.675);
|
||||||
this.showBackSpriteIconElement.setOrigin(0.0, 0.0);
|
this.showBackSpriteIconElement.setOrigin(0.0, 0.0);
|
||||||
this.showBackSpriteLabel = addTextObject(60, 7, i18next.t("pokedexUiHandler:showBackSprite"), TextStyle.PARTY, {
|
this.showBackSpriteLabel = addTextObject(
|
||||||
|
60,
|
||||||
|
7,
|
||||||
|
i18next.t("pokedexUiHandler:showBackSprite"),
|
||||||
|
TextStyle.INSTRUCTIONS_TEXT,
|
||||||
|
{
|
||||||
fontSize: instructionTextSize,
|
fontSize: instructionTextSize,
|
||||||
});
|
},
|
||||||
|
);
|
||||||
this.showBackSpriteLabel.setName("show-backSprite-label");
|
this.showBackSpriteLabel.setName("show-backSprite-label");
|
||||||
this.starterSelectContainer.add(this.showBackSpriteIconElement);
|
this.starterSelectContainer.add(this.showBackSpriteIconElement);
|
||||||
this.starterSelectContainer.add(this.showBackSpriteLabel);
|
this.starterSelectContainer.add(this.showBackSpriteLabel);
|
||||||
@ -1899,14 +1938,14 @@ export default class PokedexPageUiHandler extends MessageUiHandler {
|
|||||||
if (!(passiveAttr & PassiveAttr.UNLOCKED)) {
|
if (!(passiveAttr & PassiveAttr.UNLOCKED)) {
|
||||||
const passiveCost = getPassiveCandyCount(speciesStarterCosts[this.starterId]);
|
const passiveCost = getPassiveCandyCount(speciesStarterCosts[this.starterId]);
|
||||||
options.push({
|
options.push({
|
||||||
label: `x${passiveCost} ${i18next.t("pokedexUiHandler:unlockPassive")}`,
|
label: `×${passiveCost} ${i18next.t("pokedexUiHandler:unlockPassive")}`,
|
||||||
handler: () => {
|
handler: () => {
|
||||||
if (Overrides.FREE_CANDY_UPGRADE_OVERRIDE || candyCount >= passiveCost) {
|
if (Overrides.FREE_CANDY_UPGRADE_OVERRIDE || candyCount >= passiveCost) {
|
||||||
starterData.passiveAttr |= PassiveAttr.UNLOCKED | PassiveAttr.ENABLED;
|
starterData.passiveAttr |= PassiveAttr.UNLOCKED | PassiveAttr.ENABLED;
|
||||||
if (!Overrides.FREE_CANDY_UPGRADE_OVERRIDE) {
|
if (!Overrides.FREE_CANDY_UPGRADE_OVERRIDE) {
|
||||||
starterData.candyCount -= passiveCost;
|
starterData.candyCount -= passiveCost;
|
||||||
}
|
}
|
||||||
this.pokemonCandyCountText.setText(`x${starterData.candyCount}`);
|
this.pokemonCandyCountText.setText(`×${starterData.candyCount}`);
|
||||||
globalScene.gameData.saveSystem().then(success => {
|
globalScene.gameData.saveSystem().then(success => {
|
||||||
if (!success) {
|
if (!success) {
|
||||||
return globalScene.reset(true);
|
return globalScene.reset(true);
|
||||||
@ -1931,14 +1970,14 @@ export default class PokedexPageUiHandler extends MessageUiHandler {
|
|||||||
if (valueReduction < valueReductionMax) {
|
if (valueReduction < valueReductionMax) {
|
||||||
const reductionCost = getValueReductionCandyCounts(speciesStarterCosts[this.starterId])[valueReduction];
|
const reductionCost = getValueReductionCandyCounts(speciesStarterCosts[this.starterId])[valueReduction];
|
||||||
options.push({
|
options.push({
|
||||||
label: `x${reductionCost} ${i18next.t("pokedexUiHandler:reduceCost")}`,
|
label: `×${reductionCost} ${i18next.t("pokedexUiHandler:reduceCost")}`,
|
||||||
handler: () => {
|
handler: () => {
|
||||||
if (Overrides.FREE_CANDY_UPGRADE_OVERRIDE || candyCount >= reductionCost) {
|
if (Overrides.FREE_CANDY_UPGRADE_OVERRIDE || candyCount >= reductionCost) {
|
||||||
starterData.valueReduction++;
|
starterData.valueReduction++;
|
||||||
if (!Overrides.FREE_CANDY_UPGRADE_OVERRIDE) {
|
if (!Overrides.FREE_CANDY_UPGRADE_OVERRIDE) {
|
||||||
starterData.candyCount -= reductionCost;
|
starterData.candyCount -= reductionCost;
|
||||||
}
|
}
|
||||||
this.pokemonCandyCountText.setText(`x${starterData.candyCount}`);
|
this.pokemonCandyCountText.setText(`×${starterData.candyCount}`);
|
||||||
globalScene.gameData.saveSystem().then(success => {
|
globalScene.gameData.saveSystem().then(success => {
|
||||||
if (!success) {
|
if (!success) {
|
||||||
return globalScene.reset(true);
|
return globalScene.reset(true);
|
||||||
@ -1960,7 +1999,7 @@ export default class PokedexPageUiHandler extends MessageUiHandler {
|
|||||||
// Same species egg menu option.
|
// Same species egg menu option.
|
||||||
const sameSpeciesEggCost = getSameSpeciesEggCandyCounts(speciesStarterCosts[this.starterId]);
|
const sameSpeciesEggCost = getSameSpeciesEggCandyCounts(speciesStarterCosts[this.starterId]);
|
||||||
options.push({
|
options.push({
|
||||||
label: `x${sameSpeciesEggCost} ${i18next.t("pokedexUiHandler:sameSpeciesEgg")}`,
|
label: `×${sameSpeciesEggCost} ${i18next.t("pokedexUiHandler:sameSpeciesEgg")}`,
|
||||||
handler: () => {
|
handler: () => {
|
||||||
if (Overrides.FREE_CANDY_UPGRADE_OVERRIDE || candyCount >= sameSpeciesEggCost) {
|
if (Overrides.FREE_CANDY_UPGRADE_OVERRIDE || candyCount >= sameSpeciesEggCost) {
|
||||||
if (globalScene.gameData.eggs.length >= 99 && !Overrides.UNLIMITED_EGG_COUNT_OVERRIDE) {
|
if (globalScene.gameData.eggs.length >= 99 && !Overrides.UNLIMITED_EGG_COUNT_OVERRIDE) {
|
||||||
@ -1979,7 +2018,7 @@ export default class PokedexPageUiHandler extends MessageUiHandler {
|
|||||||
if (!Overrides.FREE_CANDY_UPGRADE_OVERRIDE) {
|
if (!Overrides.FREE_CANDY_UPGRADE_OVERRIDE) {
|
||||||
starterData.candyCount -= sameSpeciesEggCost;
|
starterData.candyCount -= sameSpeciesEggCost;
|
||||||
}
|
}
|
||||||
this.pokemonCandyCountText.setText(`x${starterData.candyCount}`);
|
this.pokemonCandyCountText.setText(`×${starterData.candyCount}`);
|
||||||
|
|
||||||
const egg = new Egg({
|
const egg = new Egg({
|
||||||
scene: globalScene,
|
scene: globalScene,
|
||||||
@ -2480,9 +2519,11 @@ export default class PokedexPageUiHandler extends MessageUiHandler {
|
|||||||
const isFormSeen = this.isSeen();
|
const isFormSeen = this.isSeen();
|
||||||
|
|
||||||
this.shinyOverlay.setVisible(shiny ?? false); // TODO: is false the correct default?
|
this.shinyOverlay.setVisible(shiny ?? false); // TODO: is false the correct default?
|
||||||
this.pokemonNumberText.setColor(this.getTextColor(shiny ? TextStyle.SUMMARY_GOLD : TextStyle.SUMMARY, false));
|
this.pokemonNumberText.setColor(
|
||||||
|
this.getTextColor(shiny ? TextStyle.SUMMARY_DEX_NUM_GOLD : TextStyle.SUMMARY_DEX_NUM, false),
|
||||||
|
);
|
||||||
this.pokemonNumberText.setShadowColor(
|
this.pokemonNumberText.setShadowColor(
|
||||||
this.getTextColor(shiny ? TextStyle.SUMMARY_GOLD : TextStyle.SUMMARY, true),
|
this.getTextColor(shiny ? TextStyle.SUMMARY_DEX_NUM_GOLD : TextStyle.SUMMARY_DEX_NUM, true),
|
||||||
);
|
);
|
||||||
|
|
||||||
const assetLoadCancelled = new BooleanHolder(false);
|
const assetLoadCancelled = new BooleanHolder(false);
|
||||||
@ -2634,7 +2675,7 @@ export default class PokedexPageUiHandler extends MessageUiHandler {
|
|||||||
this.pokemonCandyIcon.setTint(argbFromRgba(rgbHexToRgba(colorScheme[0])));
|
this.pokemonCandyIcon.setTint(argbFromRgba(rgbHexToRgba(colorScheme[0])));
|
||||||
this.pokemonCandyOverlayIcon.setTint(argbFromRgba(rgbHexToRgba(colorScheme[1])));
|
this.pokemonCandyOverlayIcon.setTint(argbFromRgba(rgbHexToRgba(colorScheme[1])));
|
||||||
this.pokemonCandyCountText.setText(
|
this.pokemonCandyCountText.setText(
|
||||||
`x${species.speciesId === SpeciesId.PIKACHU ? 0 : globalScene.gameData.starterData[this.starterId].candyCount}`,
|
`×${species.speciesId === SpeciesId.PIKACHU ? 0 : globalScene.gameData.starterData[this.starterId].candyCount}`,
|
||||||
);
|
);
|
||||||
this.pokemonCandyContainer.setVisible(true);
|
this.pokemonCandyContainer.setVisible(true);
|
||||||
|
|
||||||
|
@ -471,7 +471,7 @@ export default class PokedexUiHandler extends MessageUiHandler {
|
|||||||
this.pokemonNameText.setOrigin(0, 0);
|
this.pokemonNameText.setOrigin(0, 0);
|
||||||
this.starterSelectContainer.add(this.pokemonNameText);
|
this.starterSelectContainer.add(this.pokemonNameText);
|
||||||
|
|
||||||
this.pokemonFormText = addTextObject(6, 121, "", TextStyle.PARTY, {
|
this.pokemonFormText = addTextObject(6, 121, "", TextStyle.INSTRUCTIONS_TEXT, {
|
||||||
fontSize: textSettings.instructionTextSize,
|
fontSize: textSettings.instructionTextSize,
|
||||||
});
|
});
|
||||||
this.pokemonFormText.setOrigin(0, 0);
|
this.pokemonFormText.setOrigin(0, 0);
|
||||||
@ -561,7 +561,7 @@ export default class PokedexUiHandler extends MessageUiHandler {
|
|||||||
this.goFilterIconElement2.setName("sprite-goFilter2-icon-element");
|
this.goFilterIconElement2.setName("sprite-goFilter2-icon-element");
|
||||||
this.goFilterIconElement2.setScale(0.675);
|
this.goFilterIconElement2.setScale(0.675);
|
||||||
this.goFilterIconElement2.setOrigin(0.0, 0.0);
|
this.goFilterIconElement2.setOrigin(0.0, 0.0);
|
||||||
this.goFilterLabel = addTextObject(30, 2, i18next.t("pokedexUiHandler:goFilters"), TextStyle.PARTY, {
|
this.goFilterLabel = addTextObject(30, 2, i18next.t("pokedexUiHandler:goFilters"), TextStyle.INSTRUCTIONS_TEXT, {
|
||||||
fontSize: instructionTextSize,
|
fontSize: instructionTextSize,
|
||||||
});
|
});
|
||||||
this.goFilterLabel.setName("text-goFilter-label");
|
this.goFilterLabel.setName("text-goFilter-label");
|
||||||
@ -577,7 +577,7 @@ export default class PokedexUiHandler extends MessageUiHandler {
|
|||||||
20,
|
20,
|
||||||
10,
|
10,
|
||||||
i18next.t("pokedexUiHandler:toggleDecorations"),
|
i18next.t("pokedexUiHandler:toggleDecorations"),
|
||||||
TextStyle.PARTY,
|
TextStyle.INSTRUCTIONS_TEXT,
|
||||||
{ fontSize: instructionTextSize },
|
{ fontSize: instructionTextSize },
|
||||||
);
|
);
|
||||||
this.toggleDecorationsLabel.setName("text-toggleDecorations-label");
|
this.toggleDecorationsLabel.setName("text-toggleDecorations-label");
|
||||||
@ -588,9 +588,15 @@ export default class PokedexUiHandler extends MessageUiHandler {
|
|||||||
this.showFormTrayIconElement.setName("sprite-showFormTray-icon-element");
|
this.showFormTrayIconElement.setName("sprite-showFormTray-icon-element");
|
||||||
this.showFormTrayIconElement.setScale(0.675);
|
this.showFormTrayIconElement.setScale(0.675);
|
||||||
this.showFormTrayIconElement.setOrigin(0.0, 0.0);
|
this.showFormTrayIconElement.setOrigin(0.0, 0.0);
|
||||||
this.showFormTrayLabel = addTextObject(16, 168, i18next.t("pokedexUiHandler:showForms"), TextStyle.PARTY, {
|
this.showFormTrayLabel = addTextObject(
|
||||||
|
16,
|
||||||
|
168,
|
||||||
|
i18next.t("pokedexUiHandler:showForms"),
|
||||||
|
TextStyle.INSTRUCTIONS_TEXT,
|
||||||
|
{
|
||||||
fontSize: instructionTextSize,
|
fontSize: instructionTextSize,
|
||||||
});
|
},
|
||||||
|
);
|
||||||
this.showFormTrayLabel.setName("text-showFormTray-label");
|
this.showFormTrayLabel.setName("text-showFormTray-label");
|
||||||
this.showFormTrayIconElement.setVisible(false);
|
this.showFormTrayIconElement.setVisible(false);
|
||||||
this.showFormTrayLabel.setVisible(false);
|
this.showFormTrayLabel.setVisible(false);
|
||||||
|
@ -49,13 +49,11 @@ export default class PokemonHatchInfoContainer extends PokemonInfoContainer {
|
|||||||
this.pokemonListContainer.add(this.currentPokemonSprite);
|
this.pokemonListContainer.add(this.currentPokemonSprite);
|
||||||
|
|
||||||
// setup name and number
|
// setup name and number
|
||||||
this.pokemonNumberText = addTextObject(80, 107.5, "0000", TextStyle.SUMMARY, { fontSize: 74 });
|
this.pokemonNumberText = addTextObject(84, 107, "0000", TextStyle.EGG_SUMMARY_DEX, { fontSize: 78 });
|
||||||
this.pokemonNumberText.setOrigin(0, 0);
|
this.pokemonNumberText.setOrigin(0, 0);
|
||||||
this.pokemonListContainer.add(this.pokemonNumberText);
|
this.pokemonListContainer.add(this.pokemonNumberText);
|
||||||
|
|
||||||
this.pokemonNameText = addTextObject(7, 107.5, "", TextStyle.SUMMARY, {
|
this.pokemonNameText = addTextObject(7, 109, "", TextStyle.EGG_SUMMARY_NAME, { fontSize: 64 });
|
||||||
fontSize: 74,
|
|
||||||
});
|
|
||||||
this.pokemonNameText.setOrigin(0, 0);
|
this.pokemonNameText.setOrigin(0, 0);
|
||||||
this.pokemonListContainer.add(this.pokemonNameText);
|
this.pokemonListContainer.add(this.pokemonNameText);
|
||||||
|
|
||||||
@ -93,7 +91,7 @@ export default class PokemonHatchInfoContainer extends PokemonInfoContainer {
|
|||||||
const eggMoveBg = globalScene.add.nineslice(70, 0, "type_bgs", "unknown", 92, 14, 2, 2, 2, 2);
|
const eggMoveBg = globalScene.add.nineslice(70, 0, "type_bgs", "unknown", 92, 14, 2, 2, 2, 2);
|
||||||
eggMoveBg.setOrigin(1, 0);
|
eggMoveBg.setOrigin(1, 0);
|
||||||
|
|
||||||
const eggMoveLabel = addTextObject(70 - eggMoveBg.width / 2, 0, "???", TextStyle.PARTY);
|
const eggMoveLabel = addTextObject(70 - eggMoveBg.width / 2, 0, "???", TextStyle.MOVE_LABEL);
|
||||||
eggMoveLabel.setOrigin(0.5, 0);
|
eggMoveLabel.setOrigin(0.5, 0);
|
||||||
|
|
||||||
this.pokemonEggMoveBgs.push(eggMoveBg);
|
this.pokemonEggMoveBgs.push(eggMoveBg);
|
||||||
@ -158,7 +156,7 @@ export default class PokemonHatchInfoContainer extends PokemonInfoContainer {
|
|||||||
this.pokemonCandyIcon.setVisible(true);
|
this.pokemonCandyIcon.setVisible(true);
|
||||||
this.pokemonCandyOverlayIcon.setTint(argbFromRgba(rgbHexToRgba(colorScheme[1])));
|
this.pokemonCandyOverlayIcon.setTint(argbFromRgba(rgbHexToRgba(colorScheme[1])));
|
||||||
this.pokemonCandyOverlayIcon.setVisible(true);
|
this.pokemonCandyOverlayIcon.setVisible(true);
|
||||||
this.pokemonCandyCountText.setText(`x${globalScene.gameData.starterData[species.speciesId].candyCount}`);
|
this.pokemonCandyCountText.setText(`×${globalScene.gameData.starterData[species.speciesId].candyCount}`);
|
||||||
this.pokemonCandyCountText.setVisible(true);
|
this.pokemonCandyCountText.setVisible(true);
|
||||||
|
|
||||||
this.pokemonNumberText.setText(padInt(species.speciesId, 4));
|
this.pokemonNumberText.setText(padInt(species.speciesId, 4));
|
||||||
|
@ -22,11 +22,21 @@ interface LanguageSetting {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const languageSettings: { [key: string]: LanguageSetting } = {
|
const languageSettings: { [key: string]: LanguageSetting } = {
|
||||||
|
en: {
|
||||||
|
infoContainerTextSize: "64px",
|
||||||
|
infoContainerLabelXPos: -20,
|
||||||
|
infoContainerTextXPos: -17,
|
||||||
|
},
|
||||||
pt: {
|
pt: {
|
||||||
infoContainerTextSize: "60px",
|
infoContainerTextSize: "60px",
|
||||||
infoContainerLabelXPos: -15,
|
infoContainerLabelXPos: -15,
|
||||||
infoContainerTextXPos: -12,
|
infoContainerTextXPos: -12,
|
||||||
},
|
},
|
||||||
|
ja: {
|
||||||
|
infoContainerTextSize: "64px",
|
||||||
|
infoContainerLabelXPos: -27,
|
||||||
|
infoContainerTextXPos: -25,
|
||||||
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
export default class PokemonInfoContainer extends Phaser.GameObjects.Container {
|
export default class PokemonInfoContainer extends Phaser.GameObjects.Container {
|
||||||
@ -106,7 +116,7 @@ export default class PokemonInfoContainer extends Phaser.GameObjects.Container {
|
|||||||
moveBg.setOrigin(1, 0);
|
moveBg.setOrigin(1, 0);
|
||||||
moveBg.setName("nineslice-move-bg");
|
moveBg.setName("nineslice-move-bg");
|
||||||
|
|
||||||
const moveLabel = addTextObject(-moveBg.width / 2, 0, "-", TextStyle.PARTY);
|
const moveLabel = addTextObject(-moveBg.width / 2, 0, "-", TextStyle.MOVE_LABEL);
|
||||||
moveLabel.setOrigin(0.5, 0);
|
moveLabel.setOrigin(0.5, 0);
|
||||||
moveLabel.setName("text-move-label");
|
moveLabel.setName("text-move-label");
|
||||||
|
|
||||||
@ -445,12 +455,12 @@ export default class PokemonInfoContainer extends Phaser.GameObjects.Container {
|
|||||||
this.pokemonShinyIcon.setPosition(82, 87);
|
this.pokemonShinyIcon.setPosition(82, 87);
|
||||||
this.pokemonShinyNewIcon.setPosition(72, 87);
|
this.pokemonShinyNewIcon.setPosition(72, 87);
|
||||||
|
|
||||||
this.pokemonFormLabelText.setPosition(infoContainerLabelXPos, 152);
|
this.pokemonFormLabelText.setPosition(infoContainerLabelXPos, 153);
|
||||||
this.pokemonFormText.setPosition(infoContainerTextXPos, 152);
|
this.pokemonFormText.setPosition(infoContainerTextXPos, 153);
|
||||||
this.pokemonAbilityLabelText.setPosition(infoContainerLabelXPos, 110);
|
this.pokemonAbilityLabelText.setPosition(infoContainerLabelXPos, 111);
|
||||||
this.pokemonAbilityText.setPosition(infoContainerTextXPos, 110);
|
this.pokemonAbilityText.setPosition(infoContainerTextXPos, 111);
|
||||||
this.pokemonNatureLabelText.setPosition(infoContainerLabelXPos, 125);
|
this.pokemonNatureLabelText.setPosition(infoContainerLabelXPos, 126);
|
||||||
this.pokemonNatureText.setPosition(infoContainerTextXPos, 125);
|
this.pokemonNatureText.setPosition(infoContainerTextXPos, 126);
|
||||||
|
|
||||||
this.statsContainer.setScale(0.7);
|
this.statsContainer.setScale(0.7);
|
||||||
this.statsContainer.setPosition(30, -3);
|
this.statsContainer.setPosition(30, -3);
|
||||||
|
@ -202,7 +202,7 @@ export default class RunInfoUiHandler extends UiHandler {
|
|||||||
);
|
);
|
||||||
this.runContainer.add(abilityButtonContainer);
|
this.runContainer.add(abilityButtonContainer);
|
||||||
}
|
}
|
||||||
const headerText = addTextObject(0, 0, i18next.t("runHistory:runInfo"), TextStyle.SETTINGS_LABEL);
|
const headerText = addTextObject(0, 0, i18next.t("runHistory:runInfo"), TextStyle.HEADER_LABEL);
|
||||||
headerText.setOrigin(0, 0);
|
headerText.setOrigin(0, 0);
|
||||||
headerText.setPositionRelative(headerBg, 8, 4);
|
headerText.setPositionRelative(headerBg, 8, 4);
|
||||||
this.runContainer.add(headerText);
|
this.runContainer.add(headerText);
|
||||||
@ -603,7 +603,7 @@ export default class RunInfoUiHandler extends UiHandler {
|
|||||||
// Duration + Money
|
// Duration + Money
|
||||||
const runInfoTextContainer = globalScene.add.container(0, 0);
|
const runInfoTextContainer = globalScene.add.container(0, 0);
|
||||||
// Japanese is set to a greater line spacing of 35px in addBBCodeTextObject() if lineSpacing < 12.
|
// Japanese is set to a greater line spacing of 35px in addBBCodeTextObject() if lineSpacing < 12.
|
||||||
const lineSpacing = i18next.resolvedLanguage === "ja" ? 12 : 3;
|
const lineSpacing = i18next.resolvedLanguage === "ja" ? 3 : 3;
|
||||||
const runInfoText = addBBCodeTextObject(7, 0, "", TextStyle.WINDOW, {
|
const runInfoText = addBBCodeTextObject(7, 0, "", TextStyle.WINDOW, {
|
||||||
fontSize: "50px",
|
fontSize: "50px",
|
||||||
lineSpacing: lineSpacing,
|
lineSpacing: lineSpacing,
|
||||||
@ -768,7 +768,7 @@ export default class RunInfoUiHandler extends UiHandler {
|
|||||||
const pPassiveInfo = pokemon.passive ? passiveLabel + ": " + pokemon.getPassiveAbility().name : "";
|
const pPassiveInfo = pokemon.passive ? passiveLabel + ": " + pokemon.getPassiveAbility().name : "";
|
||||||
const pAbilityInfo = abilityLabel + ": " + pokemon.getAbility().name;
|
const pAbilityInfo = abilityLabel + ": " + pokemon.getAbility().name;
|
||||||
// Japanese is set to a greater line spacing of 35px in addBBCodeTextObject() if lineSpacing < 12.
|
// Japanese is set to a greater line spacing of 35px in addBBCodeTextObject() if lineSpacing < 12.
|
||||||
const lineSpacing = i18next.resolvedLanguage === "ja" ? 12 : 3;
|
const lineSpacing = i18next.resolvedLanguage === "ja" ? 3 : 3;
|
||||||
const pokeInfoText = addBBCodeTextObject(0, 0, pName, TextStyle.SUMMARY, {
|
const pokeInfoText = addBBCodeTextObject(0, 0, pName, TextStyle.SUMMARY, {
|
||||||
fontSize: textContainerFontSize,
|
fontSize: textContainerFontSize,
|
||||||
lineSpacing: lineSpacing,
|
lineSpacing: lineSpacing,
|
||||||
@ -866,7 +866,7 @@ export default class RunInfoUiHandler extends UiHandler {
|
|||||||
moveContainer.setScale(0.5);
|
moveContainer.setScale(0.5);
|
||||||
const moveBg = globalScene.add.nineslice(0, 0, "type_bgs", "unknown", 85, 15, 2, 2, 2, 2);
|
const moveBg = globalScene.add.nineslice(0, 0, "type_bgs", "unknown", 85, 15, 2, 2, 2, 2);
|
||||||
moveBg.setOrigin(1, 0);
|
moveBg.setOrigin(1, 0);
|
||||||
const moveLabel = addTextObject(-moveBg.width / 2, 2, "-", TextStyle.PARTY);
|
const moveLabel = addTextObject(-moveBg.width / 2, 1, "-", TextStyle.MOVE_LABEL);
|
||||||
moveLabel.setOrigin(0.5, 0);
|
moveLabel.setOrigin(0.5, 0);
|
||||||
moveLabel.setName("text-move-label");
|
moveLabel.setName("text-move-label");
|
||||||
pokemonMoveBgs.push(moveBg);
|
pokemonMoveBgs.push(moveBg);
|
||||||
|
@ -144,7 +144,7 @@ export default class NavigationMenu extends Phaser.GameObjects.Container {
|
|||||||
let relative: Phaser.GameObjects.Sprite | Phaser.GameObjects.Text = iconPreviousTab;
|
let relative: Phaser.GameObjects.Sprite | Phaser.GameObjects.Text = iconPreviousTab;
|
||||||
let relativeWidth: number = iconPreviousTab.width * 6;
|
let relativeWidth: number = iconPreviousTab.width * 6;
|
||||||
for (const label of navigationManager.labels) {
|
for (const label of navigationManager.labels) {
|
||||||
const labelText = addTextObject(0, 0, label, TextStyle.SETTINGS_LABEL);
|
const labelText = addTextObject(0, 0, label, TextStyle.SETTINGS_LABEL_NAVBAR);
|
||||||
labelText.setOrigin(0, 0);
|
labelText.setOrigin(0, 0);
|
||||||
labelText.setPositionRelative(relative, 6 + relativeWidth / 6, 0);
|
labelText.setPositionRelative(relative, 6 + relativeWidth / 6, 0);
|
||||||
this.add(labelText);
|
this.add(labelText);
|
||||||
|
@ -148,10 +148,10 @@ const languageSettings: { [key: string]: LanguageSetting } = {
|
|||||||
starterInfoXPos: 30,
|
starterInfoXPos: 30,
|
||||||
},
|
},
|
||||||
ja: {
|
ja: {
|
||||||
starterInfoTextSize: "62px",
|
starterInfoTextSize: "48px",
|
||||||
instructionTextSize: "38px",
|
instructionTextSize: "40px",
|
||||||
starterInfoYOffset: 0.5,
|
starterInfoYOffset: 1,
|
||||||
starterInfoXPos: 33,
|
starterInfoXPos: 32,
|
||||||
},
|
},
|
||||||
ca: {
|
ca: {
|
||||||
starterInfoTextSize: "48px",
|
starterInfoTextSize: "48px",
|
||||||
@ -624,7 +624,7 @@ export default class StarterSelectUiHandler extends MessageUiHandler {
|
|||||||
});
|
});
|
||||||
this.starterSelectContainer.add(this.pokemonSprite);
|
this.starterSelectContainer.add(this.pokemonSprite);
|
||||||
|
|
||||||
this.pokemonNumberText = addTextObject(17, 1, "0000", TextStyle.SUMMARY);
|
this.pokemonNumberText = addTextObject(17, 1, "0000", TextStyle.SUMMARY_DEX_NUM);
|
||||||
this.pokemonNumberText.setOrigin(0, 0);
|
this.pokemonNumberText.setOrigin(0, 0);
|
||||||
this.starterSelectContainer.add(this.pokemonNumberText);
|
this.starterSelectContainer.add(this.pokemonNumberText);
|
||||||
|
|
||||||
@ -643,7 +643,7 @@ export default class StarterSelectUiHandler extends MessageUiHandler {
|
|||||||
this.pokemonGrowthRateLabelText.setVisible(false);
|
this.pokemonGrowthRateLabelText.setVisible(false);
|
||||||
this.starterSelectContainer.add(this.pokemonGrowthRateLabelText);
|
this.starterSelectContainer.add(this.pokemonGrowthRateLabelText);
|
||||||
|
|
||||||
this.pokemonGrowthRateText = addTextObject(34, 106, "", TextStyle.SUMMARY_PINK, { fontSize: "36px" });
|
this.pokemonGrowthRateText = addTextObject(34, 106, "", TextStyle.GROWTH_RATE_TYPE, { fontSize: "36px" });
|
||||||
this.pokemonGrowthRateText.setOrigin(0, 0);
|
this.pokemonGrowthRateText.setOrigin(0, 0);
|
||||||
this.starterSelectContainer.add(this.pokemonGrowthRateText);
|
this.starterSelectContainer.add(this.pokemonGrowthRateText);
|
||||||
|
|
||||||
@ -743,7 +743,7 @@ export default class StarterSelectUiHandler extends MessageUiHandler {
|
|||||||
this.pokemonEggMoveBgs = [];
|
this.pokemonEggMoveBgs = [];
|
||||||
this.pokemonEggMoveLabels = [];
|
this.pokemonEggMoveLabels = [];
|
||||||
|
|
||||||
this.valueLimitLabel = addTextObject(teamWindowX + 17, 150, "0/10", TextStyle.TOOLTIP_CONTENT);
|
this.valueLimitLabel = addTextObject(teamWindowX + 17, 150, "0/10", TextStyle.STARTER_VALUE_LIMIT);
|
||||||
this.valueLimitLabel.setOrigin(0.5, 0);
|
this.valueLimitLabel.setOrigin(0.5, 0);
|
||||||
this.starterSelectContainer.add(this.valueLimitLabel);
|
this.starterSelectContainer.add(this.valueLimitLabel);
|
||||||
|
|
||||||
@ -869,9 +869,15 @@ export default class StarterSelectUiHandler extends MessageUiHandler {
|
|||||||
this.pokemonLuckLabelText.setOrigin(0, 0);
|
this.pokemonLuckLabelText.setOrigin(0, 0);
|
||||||
this.starterSelectContainer.add(this.pokemonLuckLabelText);
|
this.starterSelectContainer.add(this.pokemonLuckLabelText);
|
||||||
|
|
||||||
this.pokemonLuckText = addTextObject(8 + this.pokemonLuckLabelText.displayWidth + 2, 89, "0", TextStyle.WINDOW, {
|
this.pokemonLuckText = addTextObject(
|
||||||
|
8 + this.pokemonLuckLabelText.displayWidth + 2,
|
||||||
|
89,
|
||||||
|
"0",
|
||||||
|
TextStyle.LUCK_VALUE,
|
||||||
|
{
|
||||||
fontSize: "56px",
|
fontSize: "56px",
|
||||||
});
|
},
|
||||||
|
);
|
||||||
this.pokemonLuckText.setOrigin(0, 0);
|
this.pokemonLuckText.setOrigin(0, 0);
|
||||||
this.starterSelectContainer.add(this.pokemonLuckText);
|
this.starterSelectContainer.add(this.pokemonLuckText);
|
||||||
|
|
||||||
@ -944,7 +950,7 @@ export default class StarterSelectUiHandler extends MessageUiHandler {
|
|||||||
const moveBg = globalScene.add.nineslice(0, 0, "type_bgs", "unknown", 92, 14, 2, 2, 2, 2);
|
const moveBg = globalScene.add.nineslice(0, 0, "type_bgs", "unknown", 92, 14, 2, 2, 2, 2);
|
||||||
moveBg.setOrigin(1, 0);
|
moveBg.setOrigin(1, 0);
|
||||||
|
|
||||||
const moveLabel = addTextObject(-moveBg.width / 2, 0, "-", TextStyle.PARTY);
|
const moveLabel = addTextObject(-moveBg.width / 2, 0, "-", TextStyle.MOVE_LABEL);
|
||||||
moveLabel.setOrigin(0.5, 0);
|
moveLabel.setOrigin(0.5, 0);
|
||||||
|
|
||||||
this.pokemonMoveBgs.push(moveBg);
|
this.pokemonMoveBgs.push(moveBg);
|
||||||
@ -961,7 +967,7 @@ export default class StarterSelectUiHandler extends MessageUiHandler {
|
|||||||
-this.pokemonMoveBgs[0].width / 2,
|
-this.pokemonMoveBgs[0].width / 2,
|
||||||
56,
|
56,
|
||||||
"(+0)",
|
"(+0)",
|
||||||
TextStyle.PARTY,
|
TextStyle.MOVE_LABEL,
|
||||||
);
|
);
|
||||||
this.pokemonAdditionalMoveCountLabel.setOrigin(0.5, 0);
|
this.pokemonAdditionalMoveCountLabel.setOrigin(0.5, 0);
|
||||||
|
|
||||||
@ -983,7 +989,7 @@ export default class StarterSelectUiHandler extends MessageUiHandler {
|
|||||||
const eggMoveBg = globalScene.add.nineslice(0, 0, "type_bgs", "unknown", 92, 14, 2, 2, 2, 2);
|
const eggMoveBg = globalScene.add.nineslice(0, 0, "type_bgs", "unknown", 92, 14, 2, 2, 2, 2);
|
||||||
eggMoveBg.setOrigin(1, 0);
|
eggMoveBg.setOrigin(1, 0);
|
||||||
|
|
||||||
const eggMoveLabel = addTextObject(-eggMoveBg.width / 2, 0, "???", TextStyle.PARTY);
|
const eggMoveLabel = addTextObject(-eggMoveBg.width / 2, 0, "???", TextStyle.MOVE_LABEL);
|
||||||
eggMoveLabel.setOrigin(0.5, 0);
|
eggMoveLabel.setOrigin(0.5, 0);
|
||||||
|
|
||||||
this.pokemonEggMoveBgs.push(eggMoveBg);
|
this.pokemonEggMoveBgs.push(eggMoveBg);
|
||||||
@ -1027,7 +1033,7 @@ export default class StarterSelectUiHandler extends MessageUiHandler {
|
|||||||
this.instructionRowX + this.instructionRowTextOffset,
|
this.instructionRowX + this.instructionRowTextOffset,
|
||||||
this.instructionRowY,
|
this.instructionRowY,
|
||||||
i18next.t("starterSelectUiHandler:cycleShiny"),
|
i18next.t("starterSelectUiHandler:cycleShiny"),
|
||||||
TextStyle.PARTY,
|
TextStyle.INSTRUCTIONS_TEXT,
|
||||||
{ fontSize: instructionTextSize },
|
{ fontSize: instructionTextSize },
|
||||||
);
|
);
|
||||||
this.shinyLabel.setName("text-shiny-label");
|
this.shinyLabel.setName("text-shiny-label");
|
||||||
@ -1046,7 +1052,7 @@ export default class StarterSelectUiHandler extends MessageUiHandler {
|
|||||||
this.instructionRowX + this.instructionRowTextOffset,
|
this.instructionRowX + this.instructionRowTextOffset,
|
||||||
this.instructionRowY,
|
this.instructionRowY,
|
||||||
i18next.t("starterSelectUiHandler:cycleForm"),
|
i18next.t("starterSelectUiHandler:cycleForm"),
|
||||||
TextStyle.PARTY,
|
TextStyle.INSTRUCTIONS_TEXT,
|
||||||
{ fontSize: instructionTextSize },
|
{ fontSize: instructionTextSize },
|
||||||
);
|
);
|
||||||
this.formLabel.setName("text-form-label");
|
this.formLabel.setName("text-form-label");
|
||||||
@ -1065,7 +1071,7 @@ export default class StarterSelectUiHandler extends MessageUiHandler {
|
|||||||
this.instructionRowX + this.instructionRowTextOffset,
|
this.instructionRowX + this.instructionRowTextOffset,
|
||||||
this.instructionRowY,
|
this.instructionRowY,
|
||||||
i18next.t("starterSelectUiHandler:cycleGender"),
|
i18next.t("starterSelectUiHandler:cycleGender"),
|
||||||
TextStyle.PARTY,
|
TextStyle.INSTRUCTIONS_TEXT,
|
||||||
{ fontSize: instructionTextSize },
|
{ fontSize: instructionTextSize },
|
||||||
);
|
);
|
||||||
this.genderLabel.setName("text-gender-label");
|
this.genderLabel.setName("text-gender-label");
|
||||||
@ -1084,7 +1090,7 @@ export default class StarterSelectUiHandler extends MessageUiHandler {
|
|||||||
this.instructionRowX + this.instructionRowTextOffset,
|
this.instructionRowX + this.instructionRowTextOffset,
|
||||||
this.instructionRowY,
|
this.instructionRowY,
|
||||||
i18next.t("starterSelectUiHandler:cycleAbility"),
|
i18next.t("starterSelectUiHandler:cycleAbility"),
|
||||||
TextStyle.PARTY,
|
TextStyle.INSTRUCTIONS_TEXT,
|
||||||
{ fontSize: instructionTextSize },
|
{ fontSize: instructionTextSize },
|
||||||
);
|
);
|
||||||
this.abilityLabel.setName("text-ability-label");
|
this.abilityLabel.setName("text-ability-label");
|
||||||
@ -1103,7 +1109,7 @@ export default class StarterSelectUiHandler extends MessageUiHandler {
|
|||||||
this.instructionRowX + this.instructionRowTextOffset,
|
this.instructionRowX + this.instructionRowTextOffset,
|
||||||
this.instructionRowY,
|
this.instructionRowY,
|
||||||
i18next.t("starterSelectUiHandler:cycleNature"),
|
i18next.t("starterSelectUiHandler:cycleNature"),
|
||||||
TextStyle.PARTY,
|
TextStyle.INSTRUCTIONS_TEXT,
|
||||||
{ fontSize: instructionTextSize },
|
{ fontSize: instructionTextSize },
|
||||||
);
|
);
|
||||||
this.natureLabel.setName("text-nature-label");
|
this.natureLabel.setName("text-nature-label");
|
||||||
@ -1122,7 +1128,7 @@ export default class StarterSelectUiHandler extends MessageUiHandler {
|
|||||||
this.instructionRowX + this.instructionRowTextOffset,
|
this.instructionRowX + this.instructionRowTextOffset,
|
||||||
this.instructionRowY,
|
this.instructionRowY,
|
||||||
i18next.t("starterSelectUiHandler:cycleTera"),
|
i18next.t("starterSelectUiHandler:cycleTera"),
|
||||||
TextStyle.PARTY,
|
TextStyle.INSTRUCTIONS_TEXT,
|
||||||
{ fontSize: instructionTextSize },
|
{ fontSize: instructionTextSize },
|
||||||
);
|
);
|
||||||
this.teraLabel.setName("text-tera-label");
|
this.teraLabel.setName("text-tera-label");
|
||||||
@ -1141,7 +1147,7 @@ export default class StarterSelectUiHandler extends MessageUiHandler {
|
|||||||
this.filterInstructionRowX + this.instructionRowTextOffset,
|
this.filterInstructionRowX + this.instructionRowTextOffset,
|
||||||
this.filterInstructionRowY,
|
this.filterInstructionRowY,
|
||||||
i18next.t("starterSelectUiHandler:goFilter"),
|
i18next.t("starterSelectUiHandler:goFilter"),
|
||||||
TextStyle.PARTY,
|
TextStyle.INSTRUCTIONS_TEXT,
|
||||||
{ fontSize: instructionTextSize },
|
{ fontSize: instructionTextSize },
|
||||||
);
|
);
|
||||||
this.goFilterLabel.setName("text-goFilter-label");
|
this.goFilterLabel.setName("text-goFilter-label");
|
||||||
@ -2202,14 +2208,14 @@ export default class StarterSelectUiHandler extends MessageUiHandler {
|
|||||||
if (!(passiveAttr & PassiveAttr.UNLOCKED)) {
|
if (!(passiveAttr & PassiveAttr.UNLOCKED)) {
|
||||||
const passiveCost = getPassiveCandyCount(speciesStarterCosts[this.lastSpecies.speciesId]);
|
const passiveCost = getPassiveCandyCount(speciesStarterCosts[this.lastSpecies.speciesId]);
|
||||||
options.push({
|
options.push({
|
||||||
label: `x${passiveCost} ${i18next.t("starterSelectUiHandler:unlockPassive")}`,
|
label: `×${passiveCost} ${i18next.t("starterSelectUiHandler:unlockPassive")}`,
|
||||||
handler: () => {
|
handler: () => {
|
||||||
if (Overrides.FREE_CANDY_UPGRADE_OVERRIDE || candyCount >= passiveCost) {
|
if (Overrides.FREE_CANDY_UPGRADE_OVERRIDE || candyCount >= passiveCost) {
|
||||||
starterData.passiveAttr |= PassiveAttr.UNLOCKED | PassiveAttr.ENABLED;
|
starterData.passiveAttr |= PassiveAttr.UNLOCKED | PassiveAttr.ENABLED;
|
||||||
if (!Overrides.FREE_CANDY_UPGRADE_OVERRIDE) {
|
if (!Overrides.FREE_CANDY_UPGRADE_OVERRIDE) {
|
||||||
starterData.candyCount -= passiveCost;
|
starterData.candyCount -= passiveCost;
|
||||||
}
|
}
|
||||||
this.pokemonCandyCountText.setText(`x${starterData.candyCount}`);
|
this.pokemonCandyCountText.setText(`×${starterData.candyCount}`);
|
||||||
globalScene.gameData.saveSystem().then(success => {
|
globalScene.gameData.saveSystem().then(success => {
|
||||||
if (!success) {
|
if (!success) {
|
||||||
return globalScene.reset(true);
|
return globalScene.reset(true);
|
||||||
@ -2242,14 +2248,14 @@ export default class StarterSelectUiHandler extends MessageUiHandler {
|
|||||||
valueReduction
|
valueReduction
|
||||||
];
|
];
|
||||||
options.push({
|
options.push({
|
||||||
label: `x${reductionCost} ${i18next.t("starterSelectUiHandler:reduceCost")}`,
|
label: `×${reductionCost} ${i18next.t("starterSelectUiHandler:reduceCost")}`,
|
||||||
handler: () => {
|
handler: () => {
|
||||||
if (Overrides.FREE_CANDY_UPGRADE_OVERRIDE || candyCount >= reductionCost) {
|
if (Overrides.FREE_CANDY_UPGRADE_OVERRIDE || candyCount >= reductionCost) {
|
||||||
starterData.valueReduction++;
|
starterData.valueReduction++;
|
||||||
if (!Overrides.FREE_CANDY_UPGRADE_OVERRIDE) {
|
if (!Overrides.FREE_CANDY_UPGRADE_OVERRIDE) {
|
||||||
starterData.candyCount -= reductionCost;
|
starterData.candyCount -= reductionCost;
|
||||||
}
|
}
|
||||||
this.pokemonCandyCountText.setText(`x${starterData.candyCount}`);
|
this.pokemonCandyCountText.setText(`×${starterData.candyCount}`);
|
||||||
globalScene.gameData.saveSystem().then(success => {
|
globalScene.gameData.saveSystem().then(success => {
|
||||||
if (!success) {
|
if (!success) {
|
||||||
return globalScene.reset(true);
|
return globalScene.reset(true);
|
||||||
@ -2276,7 +2282,7 @@ export default class StarterSelectUiHandler extends MessageUiHandler {
|
|||||||
// Same species egg menu option.
|
// Same species egg menu option.
|
||||||
const sameSpeciesEggCost = getSameSpeciesEggCandyCounts(speciesStarterCosts[this.lastSpecies.speciesId]);
|
const sameSpeciesEggCost = getSameSpeciesEggCandyCounts(speciesStarterCosts[this.lastSpecies.speciesId]);
|
||||||
options.push({
|
options.push({
|
||||||
label: `x${sameSpeciesEggCost} ${i18next.t("starterSelectUiHandler:sameSpeciesEgg")}`,
|
label: `×${sameSpeciesEggCost} ${i18next.t("starterSelectUiHandler:sameSpeciesEgg")}`,
|
||||||
handler: () => {
|
handler: () => {
|
||||||
if (Overrides.FREE_CANDY_UPGRADE_OVERRIDE || candyCount >= sameSpeciesEggCost) {
|
if (Overrides.FREE_CANDY_UPGRADE_OVERRIDE || candyCount >= sameSpeciesEggCost) {
|
||||||
if (globalScene.gameData.eggs.length >= 99 && !Overrides.UNLIMITED_EGG_COUNT_OVERRIDE) {
|
if (globalScene.gameData.eggs.length >= 99 && !Overrides.UNLIMITED_EGG_COUNT_OVERRIDE) {
|
||||||
@ -2295,7 +2301,7 @@ export default class StarterSelectUiHandler extends MessageUiHandler {
|
|||||||
if (!Overrides.FREE_CANDY_UPGRADE_OVERRIDE) {
|
if (!Overrides.FREE_CANDY_UPGRADE_OVERRIDE) {
|
||||||
starterData.candyCount -= sameSpeciesEggCost;
|
starterData.candyCount -= sameSpeciesEggCost;
|
||||||
}
|
}
|
||||||
this.pokemonCandyCountText.setText(`x${starterData.candyCount}`);
|
this.pokemonCandyCountText.setText(`×${starterData.candyCount}`);
|
||||||
|
|
||||||
const egg = new Egg({
|
const egg = new Egg({
|
||||||
species: this.lastSpecies.speciesId,
|
species: this.lastSpecies.speciesId,
|
||||||
@ -3564,7 +3570,7 @@ export default class StarterSelectUiHandler extends MessageUiHandler {
|
|||||||
this.pokemonShinyIcon.setY(117);
|
this.pokemonShinyIcon.setY(117);
|
||||||
this.pokemonCandyIcon.setTint(argbFromRgba(rgbHexToRgba(colorScheme[0])));
|
this.pokemonCandyIcon.setTint(argbFromRgba(rgbHexToRgba(colorScheme[0])));
|
||||||
this.pokemonCandyOverlayIcon.setTint(argbFromRgba(rgbHexToRgba(colorScheme[1])));
|
this.pokemonCandyOverlayIcon.setTint(argbFromRgba(rgbHexToRgba(colorScheme[1])));
|
||||||
this.pokemonCandyCountText.setText(`x${globalScene.gameData.starterData[species.speciesId].candyCount}`);
|
this.pokemonCandyCountText.setText(`×${globalScene.gameData.starterData[species.speciesId].candyCount}`);
|
||||||
this.pokemonCandyContainer.setVisible(true);
|
this.pokemonCandyContainer.setVisible(true);
|
||||||
this.pokemonFormText.setY(42);
|
this.pokemonFormText.setY(42);
|
||||||
this.pokemonHatchedIcon.setVisible(true);
|
this.pokemonHatchedIcon.setVisible(true);
|
||||||
@ -3818,9 +3824,11 @@ export default class StarterSelectUiHandler extends MessageUiHandler {
|
|||||||
}
|
}
|
||||||
|
|
||||||
this.shinyOverlay.setVisible(shiny ?? false); // TODO: is false the correct default?
|
this.shinyOverlay.setVisible(shiny ?? false); // TODO: is false the correct default?
|
||||||
this.pokemonNumberText.setColor(this.getTextColor(shiny ? TextStyle.SUMMARY_GOLD : TextStyle.SUMMARY, false));
|
this.pokemonNumberText.setColor(
|
||||||
|
this.getTextColor(shiny ? TextStyle.SUMMARY_DEX_NUM_GOLD : TextStyle.SUMMARY_DEX_NUM, false),
|
||||||
|
);
|
||||||
this.pokemonNumberText.setShadowColor(
|
this.pokemonNumberText.setShadowColor(
|
||||||
this.getTextColor(shiny ? TextStyle.SUMMARY_GOLD : TextStyle.SUMMARY, true),
|
this.getTextColor(shiny ? TextStyle.SUMMARY_DEX_NUM_GOLD : TextStyle.SUMMARY_DEX_NUM, true),
|
||||||
);
|
);
|
||||||
|
|
||||||
if (forSeen ? this.speciesStarterDexEntry?.seenAttr : this.speciesStarterDexEntry?.caughtAttr) {
|
if (forSeen ? this.speciesStarterDexEntry?.seenAttr : this.speciesStarterDexEntry?.caughtAttr) {
|
||||||
|
@ -86,7 +86,7 @@ export class StatsContainer extends Phaser.GameObjects.Container {
|
|||||||
4 +
|
4 +
|
||||||
(this.showDiff ? 0 : ivChartLabelyOffset[s]),
|
(this.showDiff ? 0 : ivChartLabelyOffset[s]),
|
||||||
i18next.t(getStatKey(s)),
|
i18next.t(getStatKey(s)),
|
||||||
TextStyle.TOOLTIP_CONTENT,
|
TextStyle.STATS_HEXAGON,
|
||||||
);
|
);
|
||||||
statLabel.setOrigin(0.5);
|
statLabel.setOrigin(0.5);
|
||||||
|
|
||||||
@ -94,7 +94,7 @@ export class StatsContainer extends Phaser.GameObjects.Container {
|
|||||||
statLabel.x - (this.showDiff ? 0 : ivLabelOffset[s]),
|
statLabel.x - (this.showDiff ? 0 : ivLabelOffset[s]),
|
||||||
statLabel.y + 8,
|
statLabel.y + 8,
|
||||||
"0",
|
"0",
|
||||||
TextStyle.TOOLTIP_CONTENT,
|
TextStyle.STATS_HEXAGON,
|
||||||
);
|
);
|
||||||
this.ivStatValueTexts[s].setOrigin(0.5);
|
this.ivStatValueTexts[s].setOrigin(0.5);
|
||||||
|
|
||||||
|
@ -148,7 +148,7 @@ export default class SummaryUiHandler extends UiHandler {
|
|||||||
this.tabSprite.setOrigin(1, 1);
|
this.tabSprite.setOrigin(1, 1);
|
||||||
this.summaryContainer.add(this.tabSprite);
|
this.summaryContainer.add(this.tabSprite);
|
||||||
|
|
||||||
const summaryLabel = addTextObject(4, -165, i18next.t("pokemonSummary:pokemonInfo"), TextStyle.SUMMARY);
|
const summaryLabel = addTextObject(4, -165, i18next.t("pokemonSummary:pokemonInfo"), TextStyle.SUMMARY_HEADER);
|
||||||
summaryLabel.setOrigin(0, 1);
|
summaryLabel.setOrigin(0, 1);
|
||||||
this.summaryContainer.add(summaryLabel);
|
this.summaryContainer.add(summaryLabel);
|
||||||
|
|
||||||
@ -418,7 +418,7 @@ export default class SummaryUiHandler extends UiHandler {
|
|||||||
}
|
}
|
||||||
|
|
||||||
this.candyCountText.setText(
|
this.candyCountText.setText(
|
||||||
`x${globalScene.gameData.starterData[this.pokemon.species.getRootSpeciesId()].candyCount}`,
|
`×${globalScene.gameData.starterData[this.pokemon.species.getRootSpeciesId()].candyCount}`,
|
||||||
);
|
);
|
||||||
|
|
||||||
this.candyShadow.setCrop(0, 0, 16, candyCropY);
|
this.candyShadow.setCrop(0, 0, 16, candyCropY);
|
||||||
@ -864,7 +864,7 @@ export default class SummaryUiHandler extends UiHandler {
|
|||||||
141 + luckLabelText.displayWidth + 2,
|
141 + luckLabelText.displayWidth + 2,
|
||||||
28,
|
28,
|
||||||
this.pokemon.getLuck().toString(),
|
this.pokemon.getLuck().toString(),
|
||||||
TextStyle.SUMMARY,
|
TextStyle.LUCK_VALUE,
|
||||||
);
|
);
|
||||||
luckText.setOrigin(0, 0);
|
luckText.setOrigin(0, 0);
|
||||||
luckText.setTint(getVariantTint(Math.min(this.pokemon.getLuck() - 1, 2) as Variant));
|
luckText.setTint(getVariantTint(Math.min(this.pokemon.getLuck() - 1, 2) as Variant));
|
||||||
@ -917,11 +917,11 @@ export default class SummaryUiHandler extends UiHandler {
|
|||||||
abilityInfo.labelImage.setOrigin(0, 0);
|
abilityInfo.labelImage.setOrigin(0, 0);
|
||||||
profileContainer.add(abilityInfo.labelImage);
|
profileContainer.add(abilityInfo.labelImage);
|
||||||
|
|
||||||
abilityInfo.nameText = addTextObject(7, 66, abilityInfo.ability?.name!, TextStyle.SUMMARY_ALT); // TODO: is this bang correct?
|
abilityInfo.nameText = addTextObject(7, 68, abilityInfo.ability?.name!, TextStyle.SUMMARY_ALT); // TODO: is this bang correct?
|
||||||
abilityInfo.nameText.setOrigin(0, 1);
|
abilityInfo.nameText.setOrigin(0, 1);
|
||||||
profileContainer.add(abilityInfo.nameText);
|
profileContainer.add(abilityInfo.nameText);
|
||||||
|
|
||||||
abilityInfo.descriptionText = addTextObject(7, 69, abilityInfo.ability?.description!, TextStyle.WINDOW_ALT, {
|
abilityInfo.descriptionText = addTextObject(7, 71, abilityInfo.ability?.description!, TextStyle.WINDOW_ALT, {
|
||||||
wordWrap: { width: 1224 },
|
wordWrap: { width: 1224 },
|
||||||
}); // TODO: is this bang correct?
|
}); // TODO: is this bang correct?
|
||||||
abilityInfo.descriptionText.setOrigin(0, 0);
|
abilityInfo.descriptionText.setOrigin(0, 0);
|
||||||
@ -1000,16 +1000,16 @@ export default class SummaryUiHandler extends UiHandler {
|
|||||||
16 * rowIndex,
|
16 * rowIndex,
|
||||||
statName,
|
statName,
|
||||||
natureStatMultiplier === 1
|
natureStatMultiplier === 1
|
||||||
? TextStyle.SUMMARY
|
? TextStyle.SUMMARY_STATS
|
||||||
: natureStatMultiplier > 1
|
: natureStatMultiplier > 1
|
||||||
? TextStyle.SUMMARY_PINK
|
? TextStyle.SUMMARY_STATS_PINK
|
||||||
: TextStyle.SUMMARY_BLUE,
|
: TextStyle.SUMMARY_STATS_BLUE,
|
||||||
);
|
);
|
||||||
const ivLabel = addTextObject(
|
const ivLabel = addTextObject(
|
||||||
115 * colIndex + (colIndex === 1 ? 5 : 0),
|
115 * colIndex + (colIndex === 1 ? 5 : 0),
|
||||||
16 * rowIndex,
|
16 * rowIndex,
|
||||||
statName,
|
statName,
|
||||||
this.pokemon?.ivs[stat] === 31 ? TextStyle.SUMMARY_GOLD : TextStyle.SUMMARY,
|
this.pokemon?.ivs[stat] === 31 ? TextStyle.SUMMARY_STATS_GOLD : TextStyle.SUMMARY_STATS,
|
||||||
);
|
);
|
||||||
|
|
||||||
statLabel.setOrigin(0.5, 0);
|
statLabel.setOrigin(0.5, 0);
|
||||||
|
323
src/ui/text.ts
323
src/ui/text.ts
@ -11,27 +11,48 @@ export enum TextStyle {
|
|||||||
MESSAGE,
|
MESSAGE,
|
||||||
WINDOW,
|
WINDOW,
|
||||||
WINDOW_ALT,
|
WINDOW_ALT,
|
||||||
|
WINDOW_BATTLE_COMMAND,
|
||||||
BATTLE_INFO,
|
BATTLE_INFO,
|
||||||
PARTY,
|
PARTY,
|
||||||
PARTY_RED,
|
PARTY_RED,
|
||||||
|
PARTY_CANCEL_BUTTON,
|
||||||
|
INSTRUCTIONS_TEXT,
|
||||||
|
MOVE_LABEL,
|
||||||
SUMMARY,
|
SUMMARY,
|
||||||
|
SUMMARY_DEX_NUM,
|
||||||
|
SUMMARY_DEX_NUM_GOLD,
|
||||||
SUMMARY_ALT,
|
SUMMARY_ALT,
|
||||||
|
SUMMARY_HEADER,
|
||||||
SUMMARY_RED,
|
SUMMARY_RED,
|
||||||
SUMMARY_BLUE,
|
SUMMARY_BLUE,
|
||||||
SUMMARY_PINK,
|
SUMMARY_PINK,
|
||||||
SUMMARY_GOLD,
|
SUMMARY_GOLD,
|
||||||
SUMMARY_GRAY,
|
SUMMARY_GRAY,
|
||||||
SUMMARY_GREEN,
|
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, // Money default styling (pale yellow)
|
||||||
MONEY_WINDOW, // Money displayed in Windows (needs different colors based on theme)
|
MONEY_WINDOW, // Money displayed in Windows (needs different colors based on theme)
|
||||||
|
HEADER_LABEL,
|
||||||
STATS_LABEL,
|
STATS_LABEL,
|
||||||
STATS_VALUE,
|
STATS_VALUE,
|
||||||
SETTINGS_VALUE,
|
SETTINGS_VALUE,
|
||||||
SETTINGS_LABEL,
|
SETTINGS_LABEL,
|
||||||
|
SETTINGS_LABEL_NAVBAR,
|
||||||
SETTINGS_SELECTED,
|
SETTINGS_SELECTED,
|
||||||
SETTINGS_LOCKED,
|
SETTINGS_LOCKED,
|
||||||
|
EGG_LIST,
|
||||||
|
EGG_SUMMARY_NAME,
|
||||||
|
EGG_SUMMARY_DEX,
|
||||||
|
STARTER_VALUE_LIMIT,
|
||||||
TOOLTIP_TITLE,
|
TOOLTIP_TITLE,
|
||||||
TOOLTIP_CONTENT,
|
TOOLTIP_CONTENT,
|
||||||
|
FILTER_BAR_MAIN,
|
||||||
MOVE_INFO_CONTENT,
|
MOVE_INFO_CONTENT,
|
||||||
MOVE_PP_FULL,
|
MOVE_PP_FULL,
|
||||||
MOVE_PP_HALF_FULL,
|
MOVE_PP_HALF_FULL,
|
||||||
@ -73,10 +94,6 @@ export function addTextObject(
|
|||||||
ret.setLineSpacing(scale * 30);
|
ret.setLineSpacing(scale * 30);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (ret.lineSpacing < 12 && i18next.resolvedLanguage === "ja") {
|
|
||||||
ret.setLineSpacing(ret.lineSpacing + 35);
|
|
||||||
}
|
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -122,10 +139,6 @@ export function addBBCodeTextObject(
|
|||||||
ret.setLineSpacing(scale * 60);
|
ret.setLineSpacing(scale * 60);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (ret.lineSpacing < 12 && i18next.resolvedLanguage === "ja") {
|
|
||||||
ret.setLineSpacing(ret.lineSpacing + 35);
|
|
||||||
}
|
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -154,7 +167,7 @@ export function getTextStyleOptions(
|
|||||||
const lang = i18next.resolvedLanguage;
|
const lang = i18next.resolvedLanguage;
|
||||||
let shadowXpos = 4;
|
let shadowXpos = 4;
|
||||||
let shadowYpos = 5;
|
let shadowYpos = 5;
|
||||||
let scale = 0.1666666667;
|
const scale = 0.1666666667;
|
||||||
const defaultFontSize = 96;
|
const defaultFontSize = 96;
|
||||||
|
|
||||||
let styleOptions: Phaser.Types.GameObjects.Text.TextStyle = {
|
let styleOptions: Phaser.Types.GameObjects.Text.TextStyle = {
|
||||||
@ -166,13 +179,58 @@ export function getTextStyleOptions(
|
|||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
if (i18next.resolvedLanguage === "ja") {
|
|
||||||
scale = 0.1388888889;
|
|
||||||
styleOptions.padding = { top: 2, bottom: 4 };
|
|
||||||
}
|
|
||||||
|
|
||||||
switch (style) {
|
switch (style) {
|
||||||
case TextStyle.SUMMARY:
|
case TextStyle.SUMMARY: {
|
||||||
|
const fontSizeLabel = "96px";
|
||||||
|
switch (lang) {
|
||||||
|
case "ja":
|
||||||
|
styleOptions.padding = { top: 6, bottom: 4 };
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
styleOptions.fontSize = fontSizeLabel;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
// shadowXpos = 5;
|
||||||
|
// shadowYpos = 5;
|
||||||
|
// break;
|
||||||
|
case TextStyle.SUMMARY_HEADER: {
|
||||||
|
let fontSizeLabel = "96px";
|
||||||
|
switch (lang) {
|
||||||
|
case "ja":
|
||||||
|
styleOptions.padding = { bottom: 7 };
|
||||||
|
fontSizeLabel = "80px";
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
styleOptions.fontSize = fontSizeLabel;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
// shadowXpos = 5;
|
||||||
|
// shadowYpos = 5;
|
||||||
|
// break;
|
||||||
|
case TextStyle.SUMMARY_DEX_NUM: {
|
||||||
|
const fontSizeLabel = "96px";
|
||||||
|
switch (lang) {
|
||||||
|
case "ja":
|
||||||
|
styleOptions.padding = { top: 2, bottom: 10 };
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
styleOptions.fontSize = fontSizeLabel;
|
||||||
|
shadowXpos = 5;
|
||||||
|
shadowYpos = 5;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case TextStyle.SUMMARY_DEX_NUM_GOLD: {
|
||||||
|
const fontSizeLabel = "96px";
|
||||||
|
switch (lang) {
|
||||||
|
case "ja":
|
||||||
|
styleOptions.padding = { top: 2, bottom: 10 };
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
styleOptions.fontSize = fontSizeLabel;
|
||||||
|
shadowXpos = 5;
|
||||||
|
shadowYpos = 5;
|
||||||
|
break;
|
||||||
|
}
|
||||||
case TextStyle.SUMMARY_ALT:
|
case TextStyle.SUMMARY_ALT:
|
||||||
case TextStyle.SUMMARY_BLUE:
|
case TextStyle.SUMMARY_BLUE:
|
||||||
case TextStyle.SUMMARY_RED:
|
case TextStyle.SUMMARY_RED:
|
||||||
@ -180,6 +238,10 @@ export function getTextStyleOptions(
|
|||||||
case TextStyle.SUMMARY_GOLD:
|
case TextStyle.SUMMARY_GOLD:
|
||||||
case TextStyle.SUMMARY_GRAY:
|
case TextStyle.SUMMARY_GRAY:
|
||||||
case TextStyle.SUMMARY_GREEN:
|
case TextStyle.SUMMARY_GREEN:
|
||||||
|
case TextStyle.SUMMARY_STATS:
|
||||||
|
case TextStyle.SUMMARY_STATS_BLUE:
|
||||||
|
case TextStyle.SUMMARY_STATS_PINK:
|
||||||
|
case TextStyle.SUMMARY_STATS_GOLD:
|
||||||
case TextStyle.WINDOW:
|
case TextStyle.WINDOW:
|
||||||
case TextStyle.WINDOW_ALT:
|
case TextStyle.WINDOW_ALT:
|
||||||
case TextStyle.ME_OPTION_DEFAULT:
|
case TextStyle.ME_OPTION_DEFAULT:
|
||||||
@ -187,6 +249,43 @@ export function getTextStyleOptions(
|
|||||||
shadowXpos = 3;
|
shadowXpos = 3;
|
||||||
shadowYpos = 3;
|
shadowYpos = 3;
|
||||||
break;
|
break;
|
||||||
|
case TextStyle.LUCK_VALUE: {
|
||||||
|
const fontSizeLabel = "96px";
|
||||||
|
switch (lang) {
|
||||||
|
case "ja":
|
||||||
|
styleOptions.padding = { top: -6, bottom: 2 };
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
styleOptions.fontSize = fontSizeLabel;
|
||||||
|
shadowXpos = 3;
|
||||||
|
shadowYpos = 4;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case TextStyle.GROWTH_RATE_TYPE: {
|
||||||
|
switch (lang) {
|
||||||
|
case "ja":
|
||||||
|
styleOptions.padding = { left: 24 };
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
styleOptions.fontSize = defaultFontSize - 30;
|
||||||
|
shadowXpos = 3;
|
||||||
|
shadowYpos = 3;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case TextStyle.WINDOW_BATTLE_COMMAND: {
|
||||||
|
let fontSizeLabel = "96px";
|
||||||
|
switch (lang) {
|
||||||
|
case "ja":
|
||||||
|
styleOptions.padding = { top: 2 };
|
||||||
|
fontSizeLabel = "92px";
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
styleOptions.fontSize = fontSizeLabel;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
// shadowXpos = 5;
|
||||||
|
// shadowYpos = 5;
|
||||||
|
// break;
|
||||||
case TextStyle.STATS_LABEL: {
|
case TextStyle.STATS_LABEL: {
|
||||||
let fontSizeLabel = "96px";
|
let fontSizeLabel = "96px";
|
||||||
switch (lang) {
|
switch (lang) {
|
||||||
@ -218,10 +317,76 @@ export function getTextStyleOptions(
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case TextStyle.MESSAGE:
|
case TextStyle.MESSAGE:
|
||||||
case TextStyle.SETTINGS_LABEL:
|
styleOptions.fontSize = defaultFontSize;
|
||||||
case TextStyle.SETTINGS_LOCKED:
|
|
||||||
case TextStyle.SETTINGS_SELECTED:
|
|
||||||
break;
|
break;
|
||||||
|
case TextStyle.HEADER_LABEL:
|
||||||
|
styleOptions.fontSize = defaultFontSize;
|
||||||
|
styleOptions.padding = { top: 6 };
|
||||||
|
break;
|
||||||
|
case TextStyle.SETTINGS_VALUE:
|
||||||
|
case TextStyle.SETTINGS_LABEL: {
|
||||||
|
shadowXpos = 3;
|
||||||
|
shadowYpos = 3;
|
||||||
|
let fontSizeValue = "96px";
|
||||||
|
switch (lang) {
|
||||||
|
case "ja":
|
||||||
|
fontSizeValue = "80px";
|
||||||
|
styleOptions.padding = { top: 10 };
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
fontSizeValue = "96px";
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
styleOptions.fontSize = fontSizeValue;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case TextStyle.SETTINGS_LABEL_NAVBAR: {
|
||||||
|
shadowXpos = 3;
|
||||||
|
shadowYpos = 3;
|
||||||
|
let fontSizeValue = "96px";
|
||||||
|
switch (lang) {
|
||||||
|
case "ja":
|
||||||
|
fontSizeValue = "92px";
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
fontSizeValue = "96px";
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
styleOptions.fontSize = fontSizeValue;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case TextStyle.SETTINGS_LOCKED: {
|
||||||
|
shadowXpos = 3;
|
||||||
|
shadowYpos = 3;
|
||||||
|
let fontSizeValue = "96px";
|
||||||
|
switch (lang) {
|
||||||
|
case "ja":
|
||||||
|
fontSizeValue = "80px";
|
||||||
|
styleOptions.padding = { top: 10 };
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
fontSizeValue = "96px";
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
styleOptions.fontSize = fontSizeValue;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case TextStyle.SETTINGS_SELECTED: {
|
||||||
|
shadowXpos = 3;
|
||||||
|
shadowYpos = 3;
|
||||||
|
let fontSizeValue = "96px";
|
||||||
|
switch (lang) {
|
||||||
|
case "ja":
|
||||||
|
fontSizeValue = "80px";
|
||||||
|
styleOptions.padding = { top: 10 };
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
fontSizeValue = "96px";
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
styleOptions.fontSize = fontSizeValue;
|
||||||
|
break;
|
||||||
|
}
|
||||||
case TextStyle.BATTLE_INFO:
|
case TextStyle.BATTLE_INFO:
|
||||||
case TextStyle.MONEY:
|
case TextStyle.MONEY:
|
||||||
case TextStyle.MONEY_WINDOW:
|
case TextStyle.MONEY_WINDOW:
|
||||||
@ -231,11 +396,108 @@ export function getTextStyleOptions(
|
|||||||
shadowYpos = 3.5;
|
shadowYpos = 3.5;
|
||||||
break;
|
break;
|
||||||
case TextStyle.PARTY:
|
case TextStyle.PARTY:
|
||||||
case TextStyle.PARTY_RED:
|
case TextStyle.PARTY_RED: {
|
||||||
|
switch (lang) {
|
||||||
|
case "ja":
|
||||||
|
styleOptions.padding = { top: -12, bottom: 4 };
|
||||||
|
break;
|
||||||
|
}
|
||||||
styleOptions.fontSize = defaultFontSize - 30;
|
styleOptions.fontSize = defaultFontSize - 30;
|
||||||
styleOptions.fontFamily = "pkmnems";
|
styleOptions.fontFamily = "pkmnems";
|
||||||
break;
|
break;
|
||||||
case TextStyle.TOOLTIP_CONTENT:
|
}
|
||||||
|
case TextStyle.PARTY_CANCEL_BUTTON: {
|
||||||
|
switch (lang) {
|
||||||
|
case "ja":
|
||||||
|
styleOptions.fontSize = defaultFontSize - 42;
|
||||||
|
styleOptions.padding = { top: 4 };
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
styleOptions.fontSize = defaultFontSize - 30;
|
||||||
|
styleOptions.padding = { left: 12 };
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
styleOptions.fontFamily = "pkmnems";
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case TextStyle.INSTRUCTIONS_TEXT: {
|
||||||
|
switch (lang) {
|
||||||
|
case "ja":
|
||||||
|
styleOptions.padding = { top: -3, bottom: 4 };
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
styleOptions.fontSize = defaultFontSize - 30;
|
||||||
|
styleOptions.fontFamily = "pkmnems";
|
||||||
|
shadowXpos = 3;
|
||||||
|
shadowYpos = 3;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case TextStyle.MOVE_LABEL: {
|
||||||
|
switch (lang) {
|
||||||
|
case "ja":
|
||||||
|
styleOptions.fontSize = defaultFontSize - 16;
|
||||||
|
styleOptions.padding = { top: -14, bottom: 8 };
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
styleOptions.fontSize = defaultFontSize - 30;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
styleOptions.fontFamily = "pkmnems";
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case TextStyle.EGG_LIST:
|
||||||
|
styleOptions.fontSize = defaultFontSize - 34;
|
||||||
|
break;
|
||||||
|
case TextStyle.EGG_SUMMARY_NAME: {
|
||||||
|
switch (lang) {
|
||||||
|
case "ja":
|
||||||
|
styleOptions.padding = { top: -1 };
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case TextStyle.EGG_SUMMARY_DEX: {
|
||||||
|
switch (lang) {
|
||||||
|
case "ja":
|
||||||
|
styleOptions.padding = { top: 2 };
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case TextStyle.STARTER_VALUE_LIMIT:
|
||||||
|
styleOptions.fontSize = defaultFontSize - 36;
|
||||||
|
shadowXpos = 3;
|
||||||
|
shadowYpos = 3;
|
||||||
|
break;
|
||||||
|
case TextStyle.TOOLTIP_CONTENT: {
|
||||||
|
switch (lang) {
|
||||||
|
case "ja":
|
||||||
|
styleOptions.fontSize = defaultFontSize - 44;
|
||||||
|
styleOptions.padding = { top: 10, right: 10 };
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
styleOptions.fontSize = defaultFontSize - 32;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
shadowXpos = 3;
|
||||||
|
shadowYpos = 3;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case TextStyle.FILTER_BAR_MAIN: {
|
||||||
|
switch (lang) {
|
||||||
|
case "ja":
|
||||||
|
styleOptions.fontSize = defaultFontSize - 48;
|
||||||
|
styleOptions.padding = { top: 10, right: 10 };
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
styleOptions.fontSize = defaultFontSize - 32;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
shadowXpos = 3;
|
||||||
|
shadowYpos = 3;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case TextStyle.STATS_HEXAGON:
|
||||||
styleOptions.fontSize = defaultFontSize - 32;
|
styleOptions.fontSize = defaultFontSize - 32;
|
||||||
shadowXpos = 3;
|
shadowXpos = 3;
|
||||||
shadowYpos = 3;
|
shadowYpos = 3;
|
||||||
@ -330,9 +592,14 @@ export function getTextColor(textStyle: TextStyle, shadow?: boolean, uiTheme: Ui
|
|||||||
case TextStyle.MESSAGE:
|
case TextStyle.MESSAGE:
|
||||||
return !shadow ? "#f8f8f8" : "#6b5a73";
|
return !shadow ? "#f8f8f8" : "#6b5a73";
|
||||||
case TextStyle.WINDOW:
|
case TextStyle.WINDOW:
|
||||||
|
case TextStyle.WINDOW_BATTLE_COMMAND:
|
||||||
case TextStyle.MOVE_INFO_CONTENT:
|
case TextStyle.MOVE_INFO_CONTENT:
|
||||||
|
case TextStyle.STATS_HEXAGON:
|
||||||
case TextStyle.MOVE_PP_FULL:
|
case TextStyle.MOVE_PP_FULL:
|
||||||
|
case TextStyle.EGG_LIST:
|
||||||
case TextStyle.TOOLTIP_CONTENT:
|
case TextStyle.TOOLTIP_CONTENT:
|
||||||
|
case TextStyle.FILTER_BAR_MAIN:
|
||||||
|
case TextStyle.STARTER_VALUE_LIMIT:
|
||||||
case TextStyle.SETTINGS_VALUE:
|
case TextStyle.SETTINGS_VALUE:
|
||||||
if (isLegacyTheme) {
|
if (isLegacyTheme) {
|
||||||
return !shadow ? "#484848" : "#d0d0c8";
|
return !shadow ? "#484848" : "#d0d0c8";
|
||||||
@ -361,12 +628,22 @@ export function getTextColor(textStyle: TextStyle, shadow?: boolean, uiTheme: Ui
|
|||||||
}
|
}
|
||||||
return !shadow ? "#f8f8f8" : "#6b5a73";
|
return !shadow ? "#f8f8f8" : "#6b5a73";
|
||||||
case TextStyle.PARTY:
|
case TextStyle.PARTY:
|
||||||
|
case TextStyle.PARTY_CANCEL_BUTTON:
|
||||||
|
case TextStyle.INSTRUCTIONS_TEXT:
|
||||||
|
case TextStyle.MOVE_LABEL:
|
||||||
return !shadow ? "#f8f8f8" : "#707070";
|
return !shadow ? "#f8f8f8" : "#707070";
|
||||||
case TextStyle.PARTY_RED:
|
case TextStyle.PARTY_RED:
|
||||||
return !shadow ? "#f89890" : "#984038";
|
return !shadow ? "#f89890" : "#984038";
|
||||||
case TextStyle.SUMMARY:
|
case TextStyle.SUMMARY:
|
||||||
|
case TextStyle.SUMMARY_DEX_NUM:
|
||||||
|
case TextStyle.SUMMARY_HEADER:
|
||||||
|
case TextStyle.SUMMARY_STATS:
|
||||||
|
case TextStyle.EGG_SUMMARY_NAME:
|
||||||
|
case TextStyle.EGG_SUMMARY_DEX:
|
||||||
|
case TextStyle.LUCK_VALUE:
|
||||||
return !shadow ? "#f8f8f8" : "#636363";
|
return !shadow ? "#f8f8f8" : "#636363";
|
||||||
case TextStyle.SUMMARY_ALT:
|
case TextStyle.SUMMARY_ALT:
|
||||||
|
case TextStyle.GROWTH_RATE_TYPE:
|
||||||
if (isLegacyTheme) {
|
if (isLegacyTheme) {
|
||||||
return !shadow ? "#f8f8f8" : "#636363";
|
return !shadow ? "#f8f8f8" : "#636363";
|
||||||
}
|
}
|
||||||
@ -375,10 +652,14 @@ export function getTextColor(textStyle: TextStyle, shadow?: boolean, uiTheme: Ui
|
|||||||
case TextStyle.TOOLTIP_TITLE:
|
case TextStyle.TOOLTIP_TITLE:
|
||||||
return !shadow ? "#e70808" : "#ffbd73";
|
return !shadow ? "#e70808" : "#ffbd73";
|
||||||
case TextStyle.SUMMARY_BLUE:
|
case TextStyle.SUMMARY_BLUE:
|
||||||
|
case TextStyle.SUMMARY_STATS_BLUE:
|
||||||
return !shadow ? "#40c8f8" : "#006090";
|
return !shadow ? "#40c8f8" : "#006090";
|
||||||
case TextStyle.SUMMARY_PINK:
|
case TextStyle.SUMMARY_PINK:
|
||||||
|
case TextStyle.SUMMARY_STATS_PINK:
|
||||||
return !shadow ? "#f89890" : "#984038";
|
return !shadow ? "#f89890" : "#984038";
|
||||||
case TextStyle.SUMMARY_GOLD:
|
case TextStyle.SUMMARY_GOLD:
|
||||||
|
case TextStyle.SUMMARY_DEX_NUM_GOLD:
|
||||||
|
case TextStyle.SUMMARY_STATS_GOLD:
|
||||||
case TextStyle.MONEY:
|
case TextStyle.MONEY:
|
||||||
return !shadow ? "#e8e8a8" : "#a0a060"; // Pale Yellow/Gold
|
return !shadow ? "#e8e8a8" : "#a0a060"; // Pale Yellow/Gold
|
||||||
case TextStyle.MONEY_WINDOW:
|
case TextStyle.MONEY_WINDOW:
|
||||||
@ -399,6 +680,8 @@ export function getTextColor(textStyle: TextStyle, shadow?: boolean, uiTheme: Ui
|
|||||||
case TextStyle.SUMMARY_GREEN:
|
case TextStyle.SUMMARY_GREEN:
|
||||||
return !shadow ? "#78c850" : "#306850";
|
return !shadow ? "#78c850" : "#306850";
|
||||||
case TextStyle.SETTINGS_LABEL:
|
case TextStyle.SETTINGS_LABEL:
|
||||||
|
case TextStyle.SETTINGS_LABEL_NAVBAR:
|
||||||
|
case TextStyle.HEADER_LABEL:
|
||||||
case TextStyle.PERFECT_IV:
|
case TextStyle.PERFECT_IV:
|
||||||
return !shadow ? "#f8b050" : "#c07800";
|
return !shadow ? "#f8b050" : "#c07800";
|
||||||
case TextStyle.SETTINGS_SELECTED:
|
case TextStyle.SETTINGS_SELECTED:
|
||||||
|
Loading…
Reference in New Issue
Block a user