mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-07-16 21:32: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 { 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
|
||||
* 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 { getBattleCountSplashMessage, getSplashMessages } from "../data/splash-messages";
|
||||
import i18next from "i18next";
|
||||
import * as Overrides from '../overrides';
|
||||
|
||||
export default class TitleUiHandler extends OptionSelectUiHandler {
|
||||
private titleContainer: Phaser.GameObjects.Container;
|
||||
@ -14,6 +13,12 @@ export default class TitleUiHandler extends OptionSelectUiHandler {
|
||||
private playerCountLabel: Phaser.GameObjects.Text;
|
||||
private splashMessage: string;
|
||||
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;
|
||||
|
||||
@ -43,11 +48,11 @@ export default class TitleUiHandler extends OptionSelectUiHandler {
|
||||
this.playerCountLabel.setOrigin(1, 0);
|
||||
this.titleContainer.add(this.playerCountLabel);
|
||||
|
||||
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, {
|
||||
if (this.MENU_MESSAGE.active) {
|
||||
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',
|
||||
backgroundColor: Overrides.MENU_MESSAGE.backgroundColor,
|
||||
color: Overrides.MENU_MESSAGE.textColor !== "" ? Overrides.MENU_MESSAGE.textColor : "#FFFFFF"
|
||||
backgroundColor: this.MENU_MESSAGE.backgroundColor,
|
||||
color: this.MENU_MESSAGE.textColor !== "" ? this.MENU_MESSAGE.textColor : "#FFFFFF"
|
||||
});
|
||||
this.menuMessage.setOrigin(1, 0);
|
||||
this.titleContainer.add(this.menuMessage);
|
||||
|
Loading…
Reference in New Issue
Block a user