mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-07-17 05:42:18 +02:00
Reformat variable
This commit is contained in:
parent
33b6e79703
commit
13922aac51
@ -12,10 +12,13 @@ import { Stat } from './data/pokemon-stat';
|
|||||||
import { PokeballCounts } from './battle-scene';
|
import { PokeballCounts } from './battle-scene';
|
||||||
import { PokeballType } from './data/pokeball';
|
import { PokeballType } from './data/pokeball';
|
||||||
|
|
||||||
|
export const MENU_MESSAGE: { active: boolean, text: string, textColor: string, backgroundColor: string } = {
|
||||||
|
active: true,
|
||||||
|
text: "Shiny event active!",
|
||||||
|
textColor: "#FFD700",
|
||||||
|
backgroundColor: "#FAFAD2"
|
||||||
|
}
|
||||||
|
|
||||||
export const MENU_MESSAGE: string = "";
|
|
||||||
export const MENU_MESSAGE_TEXT_COLOR: string = "";
|
|
||||||
export const MENU_MESSAGE_BACKGROUND_COLOR: string = "";
|
|
||||||
/**
|
/**
|
||||||
* Overrides for testing different in game situations
|
* Overrides for testing different in game situations
|
||||||
* if an override name starts with "STARTING", it will apply when a new run begins
|
* if an override name starts with "STARTING", it will apply when a new run begins
|
||||||
|
@ -6,7 +6,7 @@ import * as Utils from "../utils";
|
|||||||
import { TextStyle, addTextObject } from "./text";
|
import { TextStyle, addTextObject } from "./text";
|
||||||
import { getBattleCountSplashMessage, getSplashMessages } from "../data/splash-messages";
|
import { getBattleCountSplashMessage, getSplashMessages } from "../data/splash-messages";
|
||||||
import i18next from "i18next";
|
import i18next from "i18next";
|
||||||
import { MENU_MESSAGE, MENU_MESSAGE_TEXT_COLOR, MENU_MESSAGE_BACKGROUND_COLOR } from "../overrides";
|
import * as Overrides from '../overrides';
|
||||||
|
|
||||||
export default class TitleUiHandler extends OptionSelectUiHandler {
|
export default class TitleUiHandler extends OptionSelectUiHandler {
|
||||||
private titleContainer: Phaser.GameObjects.Container;
|
private titleContainer: Phaser.GameObjects.Container;
|
||||||
@ -43,11 +43,11 @@ export default class TitleUiHandler extends OptionSelectUiHandler {
|
|||||||
this.playerCountLabel.setOrigin(1, 0);
|
this.playerCountLabel.setOrigin(1, 0);
|
||||||
this.titleContainer.add(this.playerCountLabel);
|
this.titleContainer.add(this.playerCountLabel);
|
||||||
|
|
||||||
if (MENU_MESSAGE !== "") {
|
if (Overrides.MENU_MESSAGE.active) {
|
||||||
this.menuMessage = addTextObject(this.scene, (this.scene.game.canvas.width / 6) - 2, (this.scene.game.canvas.height / 6) - 100, MENU_MESSAGE, TextStyle.MESSAGE, {
|
this.menuMessage = addTextObject(this.scene, (this.scene.game.canvas.width / 6) - 2, (this.scene.game.canvas.height / 6) - 100, Overrides.MENU_MESSAGE.text, TextStyle.MESSAGE, {
|
||||||
fontSize: '54px',
|
fontSize: '54px',
|
||||||
backgroundColor: MENU_MESSAGE_BACKGROUND_COLOR,
|
backgroundColor: Overrides.MENU_MESSAGE.backgroundColor,
|
||||||
color: MENU_MESSAGE_TEXT_COLOR !== "" ? MENU_MESSAGE_TEXT_COLOR : "#FFFFFF"
|
color: Overrides.MENU_MESSAGE.textColor !== "" ? Overrides.MENU_MESSAGE.textColor : "#FFFFFF"
|
||||||
});
|
});
|
||||||
this.menuMessage.setOrigin(1, 0);
|
this.menuMessage.setOrigin(1, 0);
|
||||||
this.titleContainer.add(this.menuMessage);
|
this.titleContainer.add(this.menuMessage);
|
||||||
|
Loading…
Reference in New Issue
Block a user