mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-07-17 05:42:18 +02:00
Move variable over to title UI handler
This commit is contained in:
parent
13922aac51
commit
b9a502a675
@ -12,13 +12,6 @@ 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"
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 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,6 @@ 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 * 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;
|
||||||
@ -14,6 +13,12 @@ export default class TitleUiHandler extends OptionSelectUiHandler {
|
|||||||
private playerCountLabel: Phaser.GameObjects.Text;
|
private playerCountLabel: Phaser.GameObjects.Text;
|
||||||
private splashMessage: string;
|
private splashMessage: string;
|
||||||
private splashMessageText: Phaser.GameObjects.Text;
|
private splashMessageText: Phaser.GameObjects.Text;
|
||||||
|
private MENU_MESSAGE: { active: boolean, text: string, textColor: string, backgroundColor: string } = {
|
||||||
|
active: true,
|
||||||
|
text: "Shiny event active!",
|
||||||
|
textColor: "#FFD700",
|
||||||
|
backgroundColor: "#FAFAD2"
|
||||||
|
}
|
||||||
|
|
||||||
private titleStatsTimer: number;
|
private titleStatsTimer: number;
|
||||||
|
|
||||||
@ -43,11 +48,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 (Overrides.MENU_MESSAGE.active) {
|
if (this.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, {
|
this.menuMessage = addTextObject(this.scene, (this.scene.game.canvas.width / 6) - 2, (this.scene.game.canvas.height / 6) - 100, this.MENU_MESSAGE.text, TextStyle.MESSAGE, {
|
||||||
fontSize: '54px',
|
fontSize: '54px',
|
||||||
backgroundColor: Overrides.MENU_MESSAGE.backgroundColor,
|
backgroundColor: this.MENU_MESSAGE.backgroundColor,
|
||||||
color: Overrides.MENU_MESSAGE.textColor !== "" ? Overrides.MENU_MESSAGE.textColor : "#FFFFFF"
|
color: this.MENU_MESSAGE.textColor !== "" ? this.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