mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-07-16 21:32: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 { 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
|
||||
* 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 { getBattleCountSplashMessage, getSplashMessages } from "../data/splash-messages";
|
||||
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 {
|
||||
private titleContainer: Phaser.GameObjects.Container;
|
||||
@ -43,11 +43,11 @@ export default class TitleUiHandler extends OptionSelectUiHandler {
|
||||
this.playerCountLabel.setOrigin(1, 0);
|
||||
this.titleContainer.add(this.playerCountLabel);
|
||||
|
||||
if (MENU_MESSAGE !== "") {
|
||||
this.menuMessage = addTextObject(this.scene, (this.scene.game.canvas.width / 6) - 2, (this.scene.game.canvas.height / 6) - 100, MENU_MESSAGE, TextStyle.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, Overrides.MENU_MESSAGE.text, TextStyle.MESSAGE, {
|
||||
fontSize: '54px',
|
||||
backgroundColor: MENU_MESSAGE_BACKGROUND_COLOR,
|
||||
color: MENU_MESSAGE_TEXT_COLOR !== "" ? MENU_MESSAGE_TEXT_COLOR : "#FFFFFF"
|
||||
backgroundColor: Overrides.MENU_MESSAGE.backgroundColor,
|
||||
color: Overrides.MENU_MESSAGE.textColor !== "" ? Overrides.MENU_MESSAGE.textColor : "#FFFFFF"
|
||||
});
|
||||
this.menuMessage.setOrigin(1, 0);
|
||||
this.titleContainer.add(this.menuMessage);
|
||||
|
Loading…
Reference in New Issue
Block a user