mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-07-27 18:52:19 +02:00
Player count is never covered behind title menu
This commit is contained in:
parent
d38418b5ed
commit
af4ea57594
@ -1,7 +1,7 @@
|
|||||||
import OptionSelectUiHandler from "./settings/option-select-ui-handler";
|
import OptionSelectUiHandler from "./settings/option-select-ui-handler";
|
||||||
import { Mode } from "./ui";
|
import { Mode } from "./ui";
|
||||||
import * as Utils from "../utils";
|
import * as Utils from "../utils";
|
||||||
import { TextStyle, addTextObject, getTextStyleOptions } from "./text";
|
import { TextStyle, addTextObject } from "./text";
|
||||||
import { getSplashMessages } from "../data/splash-messages";
|
import { getSplashMessages } from "../data/splash-messages";
|
||||||
import i18next from "i18next";
|
import i18next from "i18next";
|
||||||
import { TimedEventDisplay } from "#app/timed-event-manager";
|
import { TimedEventDisplay } from "#app/timed-event-manager";
|
||||||
@ -47,8 +47,8 @@ export default class TitleUiHandler extends OptionSelectUiHandler {
|
|||||||
}
|
}
|
||||||
|
|
||||||
this.playerCountLabel = addTextObject(
|
this.playerCountLabel = addTextObject(
|
||||||
(globalScene.game.canvas.width / 6) - 2,
|
// Actual y position will be determined after the title menu has been populated with options
|
||||||
(globalScene.game.canvas.height / 6) - 13 - 576 * getTextStyleOptions(TextStyle.WINDOW, globalScene.uiTheme).scale,
|
(globalScene.game.canvas.width / 6) - 2, 0,
|
||||||
`? ${i18next.t("menu:playersOnline")}`,
|
`? ${i18next.t("menu:playersOnline")}`,
|
||||||
TextStyle.MESSAGE,
|
TextStyle.MESSAGE,
|
||||||
{ fontSize: "54px" }
|
{ fontSize: "54px" }
|
||||||
@ -96,6 +96,9 @@ export default class TitleUiHandler extends OptionSelectUiHandler {
|
|||||||
const ret = super.show(args);
|
const ret = super.show(args);
|
||||||
|
|
||||||
if (ret) {
|
if (ret) {
|
||||||
|
// Moving player count to top of the menu
|
||||||
|
this.playerCountLabel.setY((globalScene.game.canvas.height / 6) - 13 - this.getWindowHeight());
|
||||||
|
|
||||||
this.splashMessage = Utils.randItem(getSplashMessages());
|
this.splashMessage = Utils.randItem(getSplashMessages());
|
||||||
this.splashMessageText.setText(i18next.t(this.splashMessage, { count: TitleUiHandler.BATTLES_WON_FALLBACK }));
|
this.splashMessageText.setText(i18next.t(this.splashMessage, { count: TitleUiHandler.BATTLES_WON_FALLBACK }));
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user