mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-07-03 23:12:20 +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 { 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 {
|
||||||
|
@ -398,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.LUCK_VALUE, {
|
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);
|
||||||
|
|
||||||
@ -584,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.INSTRUCTIONS_TEXT, {
|
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);
|
||||||
@ -2507,7 +2519,9 @@ 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_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.pokemonNumberText.setShadowColor(
|
||||||
this.getTextColor(shiny ? TextStyle.SUMMARY_DEX_NUM_GOLD : TextStyle.SUMMARY_DEX_NUM, true),
|
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.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.INSTRUCTIONS_TEXT, {
|
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);
|
||||||
|
@ -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.LUCK_VALUE, {
|
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);
|
||||||
|
|
||||||
@ -3818,7 +3824,9 @@ 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_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.pokemonNumberText.setShadowColor(
|
||||||
this.getTextColor(shiny ? TextStyle.SUMMARY_DEX_NUM_GOLD : TextStyle.SUMMARY_DEX_NUM, true),
|
this.getTextColor(shiny ? TextStyle.SUMMARY_DEX_NUM_GOLD : TextStyle.SUMMARY_DEX_NUM, true),
|
||||||
);
|
);
|
||||||
|
@ -208,7 +208,7 @@ export function getTextStyleOptions(
|
|||||||
// shadowYpos = 5;
|
// shadowYpos = 5;
|
||||||
// break;
|
// break;
|
||||||
case TextStyle.SUMMARY_DEX_NUM: {
|
case TextStyle.SUMMARY_DEX_NUM: {
|
||||||
let fontSizeLabel = "96px";
|
const fontSizeLabel = "96px";
|
||||||
switch (lang) {
|
switch (lang) {
|
||||||
case "ja":
|
case "ja":
|
||||||
styleOptions.padding = { top: 2, bottom: 10 };
|
styleOptions.padding = { top: 2, bottom: 10 };
|
||||||
@ -220,7 +220,7 @@ export function getTextStyleOptions(
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case TextStyle.SUMMARY_DEX_NUM_GOLD: {
|
case TextStyle.SUMMARY_DEX_NUM_GOLD: {
|
||||||
let fontSizeLabel = "96px";
|
const fontSizeLabel = "96px";
|
||||||
switch (lang) {
|
switch (lang) {
|
||||||
case "ja":
|
case "ja":
|
||||||
styleOptions.padding = { top: 2, bottom: 10 };
|
styleOptions.padding = { top: 2, bottom: 10 };
|
||||||
@ -250,7 +250,7 @@ export function getTextStyleOptions(
|
|||||||
shadowYpos = 3;
|
shadowYpos = 3;
|
||||||
break;
|
break;
|
||||||
case TextStyle.LUCK_VALUE: {
|
case TextStyle.LUCK_VALUE: {
|
||||||
let fontSizeLabel = "96px";
|
const fontSizeLabel = "96px";
|
||||||
switch (lang) {
|
switch (lang) {
|
||||||
case "ja":
|
case "ja":
|
||||||
styleOptions.padding = { top: -6, bottom: 2 };
|
styleOptions.padding = { top: -6, bottom: 2 };
|
||||||
|
Loading…
Reference in New Issue
Block a user