mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-07-03 06:52:16 +02:00
Apply Biome
This commit is contained in:
parent
d0fe23d5ef
commit
203e13852b
@ -2,7 +2,6 @@ import type { InfoToggle } from "../battle-scene";
|
||||
import { TextStyle, addTextObject } from "./text";
|
||||
import { addWindow } from "./ui-theme";
|
||||
import { fixedInt } from "#app/utils/common";
|
||||
import i18next from "i18next";
|
||||
import { globalScene } from "#app/global-scene";
|
||||
|
||||
export interface PokedexInfoOverlaySettings {
|
||||
|
@ -398,9 +398,15 @@ export default class PokedexPageUiHandler extends MessageUiHandler {
|
||||
this.pokemonLuckLabelText.setOrigin(0, 0);
|
||||
this.starterSelectContainer.add(this.pokemonLuckLabelText);
|
||||
|
||||
this.pokemonLuckText = addTextObject(8 + this.pokemonLuckLabelText.displayWidth + 2, 89, "0", TextStyle.LUCK_VALUE, {
|
||||
fontSize: "56px",
|
||||
});
|
||||
this.pokemonLuckText = addTextObject(
|
||||
8 + this.pokemonLuckLabelText.displayWidth + 2,
|
||||
89,
|
||||
"0",
|
||||
TextStyle.LUCK_VALUE,
|
||||
{
|
||||
fontSize: "56px",
|
||||
},
|
||||
);
|
||||
this.pokemonLuckText.setOrigin(0, 0);
|
||||
this.starterSelectContainer.add(this.pokemonLuckText);
|
||||
|
||||
@ -584,9 +590,15 @@ export default class PokedexPageUiHandler extends MessageUiHandler {
|
||||
this.showBackSpriteIconElement.setName("show-backSprite-icon-element");
|
||||
this.showBackSpriteIconElement.setScale(0.675);
|
||||
this.showBackSpriteIconElement.setOrigin(0.0, 0.0);
|
||||
this.showBackSpriteLabel = addTextObject(60, 7, i18next.t("pokedexUiHandler:showBackSprite"), TextStyle.INSTRUCTIONS_TEXT, {
|
||||
fontSize: instructionTextSize,
|
||||
});
|
||||
this.showBackSpriteLabel = addTextObject(
|
||||
60,
|
||||
7,
|
||||
i18next.t("pokedexUiHandler:showBackSprite"),
|
||||
TextStyle.INSTRUCTIONS_TEXT,
|
||||
{
|
||||
fontSize: instructionTextSize,
|
||||
},
|
||||
);
|
||||
this.showBackSpriteLabel.setName("show-backSprite-label");
|
||||
this.starterSelectContainer.add(this.showBackSpriteIconElement);
|
||||
this.starterSelectContainer.add(this.showBackSpriteLabel);
|
||||
@ -2507,7 +2519,9 @@ export default class PokedexPageUiHandler extends MessageUiHandler {
|
||||
const isFormSeen = this.isSeen();
|
||||
|
||||
this.shinyOverlay.setVisible(shiny ?? false); // TODO: is false the correct default?
|
||||
this.pokemonNumberText.setColor(this.getTextColor(shiny ? TextStyle.SUMMARY_DEX_NUM_GOLD : TextStyle.SUMMARY_DEX_NUM, false));
|
||||
this.pokemonNumberText.setColor(
|
||||
this.getTextColor(shiny ? TextStyle.SUMMARY_DEX_NUM_GOLD : TextStyle.SUMMARY_DEX_NUM, false),
|
||||
);
|
||||
this.pokemonNumberText.setShadowColor(
|
||||
this.getTextColor(shiny ? TextStyle.SUMMARY_DEX_NUM_GOLD : TextStyle.SUMMARY_DEX_NUM, true),
|
||||
);
|
||||
|
@ -588,9 +588,15 @@ export default class PokedexUiHandler extends MessageUiHandler {
|
||||
this.showFormTrayIconElement.setName("sprite-showFormTray-icon-element");
|
||||
this.showFormTrayIconElement.setScale(0.675);
|
||||
this.showFormTrayIconElement.setOrigin(0.0, 0.0);
|
||||
this.showFormTrayLabel = addTextObject(16, 168, i18next.t("pokedexUiHandler:showForms"), TextStyle.INSTRUCTIONS_TEXT, {
|
||||
fontSize: instructionTextSize,
|
||||
});
|
||||
this.showFormTrayLabel = addTextObject(
|
||||
16,
|
||||
168,
|
||||
i18next.t("pokedexUiHandler:showForms"),
|
||||
TextStyle.INSTRUCTIONS_TEXT,
|
||||
{
|
||||
fontSize: instructionTextSize,
|
||||
},
|
||||
);
|
||||
this.showFormTrayLabel.setName("text-showFormTray-label");
|
||||
this.showFormTrayIconElement.setVisible(false);
|
||||
this.showFormTrayLabel.setVisible(false);
|
||||
|
@ -869,9 +869,15 @@ export default class StarterSelectUiHandler extends MessageUiHandler {
|
||||
this.pokemonLuckLabelText.setOrigin(0, 0);
|
||||
this.starterSelectContainer.add(this.pokemonLuckLabelText);
|
||||
|
||||
this.pokemonLuckText = addTextObject(8 + this.pokemonLuckLabelText.displayWidth + 2, 89, "0", TextStyle.LUCK_VALUE, {
|
||||
fontSize: "56px",
|
||||
});
|
||||
this.pokemonLuckText = addTextObject(
|
||||
8 + this.pokemonLuckLabelText.displayWidth + 2,
|
||||
89,
|
||||
"0",
|
||||
TextStyle.LUCK_VALUE,
|
||||
{
|
||||
fontSize: "56px",
|
||||
},
|
||||
);
|
||||
this.pokemonLuckText.setOrigin(0, 0);
|
||||
this.starterSelectContainer.add(this.pokemonLuckText);
|
||||
|
||||
@ -3818,7 +3824,9 @@ export default class StarterSelectUiHandler extends MessageUiHandler {
|
||||
}
|
||||
|
||||
this.shinyOverlay.setVisible(shiny ?? false); // TODO: is false the correct default?
|
||||
this.pokemonNumberText.setColor(this.getTextColor(shiny ? TextStyle.SUMMARY_DEX_NUM_GOLD : TextStyle.SUMMARY_DEX_NUM, false));
|
||||
this.pokemonNumberText.setColor(
|
||||
this.getTextColor(shiny ? TextStyle.SUMMARY_DEX_NUM_GOLD : TextStyle.SUMMARY_DEX_NUM, false),
|
||||
);
|
||||
this.pokemonNumberText.setShadowColor(
|
||||
this.getTextColor(shiny ? TextStyle.SUMMARY_DEX_NUM_GOLD : TextStyle.SUMMARY_DEX_NUM, true),
|
||||
);
|
||||
|
@ -208,27 +208,27 @@ export function getTextStyleOptions(
|
||||
// shadowYpos = 5;
|
||||
// break;
|
||||
case TextStyle.SUMMARY_DEX_NUM: {
|
||||
let fontSizeLabel = "96px";
|
||||
const fontSizeLabel = "96px";
|
||||
switch (lang) {
|
||||
case "ja":
|
||||
styleOptions.padding = { top: 2, bottom: 10 };
|
||||
styleOptions.padding = { top: 2, bottom: 10 };
|
||||
break;
|
||||
}
|
||||
styleOptions.fontSize = fontSizeLabel;
|
||||
shadowXpos = 5;
|
||||
shadowYpos = 5;
|
||||
shadowXpos = 5;
|
||||
shadowYpos = 5;
|
||||
break;
|
||||
}
|
||||
case TextStyle.SUMMARY_DEX_NUM_GOLD: {
|
||||
let fontSizeLabel = "96px";
|
||||
const fontSizeLabel = "96px";
|
||||
switch (lang) {
|
||||
case "ja":
|
||||
styleOptions.padding = { top: 2, bottom: 10 };
|
||||
styleOptions.padding = { top: 2, bottom: 10 };
|
||||
break;
|
||||
}
|
||||
styleOptions.fontSize = fontSizeLabel;
|
||||
shadowXpos = 5;
|
||||
shadowYpos = 5;
|
||||
shadowXpos = 5;
|
||||
shadowYpos = 5;
|
||||
break;
|
||||
}
|
||||
case TextStyle.SUMMARY_ALT:
|
||||
@ -250,7 +250,7 @@ export function getTextStyleOptions(
|
||||
shadowYpos = 3;
|
||||
break;
|
||||
case TextStyle.LUCK_VALUE: {
|
||||
let fontSizeLabel = "96px";
|
||||
const fontSizeLabel = "96px";
|
||||
switch (lang) {
|
||||
case "ja":
|
||||
styleOptions.padding = { top: -6, bottom: 2 };
|
||||
@ -431,7 +431,7 @@ export function getTextStyleOptions(
|
||||
shadowXpos = 3;
|
||||
shadowYpos = 3;
|
||||
break;
|
||||
}
|
||||
}
|
||||
case TextStyle.MOVE_LABEL: {
|
||||
switch (lang) {
|
||||
case "ja":
|
||||
|
Loading…
Reference in New Issue
Block a user