mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-02-21 03:37:28 +00:00
update continue button text logic
This commit is contained in:
parent
28dd929da2
commit
d4565158b1
@ -14,6 +14,7 @@ import Overrides from "#app/overrides";
|
|||||||
import i18next from "i18next";
|
import i18next from "i18next";
|
||||||
import { ShopCursorTarget } from "#app/enums/shop-cursor-target";
|
import { ShopCursorTarget } from "#app/enums/shop-cursor-target";
|
||||||
import { IntegerHolder } from "./../utils";
|
import { IntegerHolder } from "./../utils";
|
||||||
|
import Phaser from "phaser";
|
||||||
|
|
||||||
export const SHOP_OPTIONS_ROW_LIMIT = 6;
|
export const SHOP_OPTIONS_ROW_LIMIT = 6;
|
||||||
|
|
||||||
@ -115,6 +116,11 @@ export default class ModifierSelectUiHandler extends AwaitableUiHandler {
|
|||||||
this.continueButtonContainer.setVisible(false);
|
this.continueButtonContainer.setVisible(false);
|
||||||
ui.add(this.continueButtonContainer);
|
ui.add(this.continueButtonContainer);
|
||||||
|
|
||||||
|
// Create continue button
|
||||||
|
const continueButtonText = addTextObject(this.scene, -24, 5, i18next.t("modifierSelectUiHandler:continueNextWaveButton"), TextStyle.MESSAGE);
|
||||||
|
continueButtonText.setName("text-continue-btn");
|
||||||
|
this.continueButtonContainer.add(continueButtonText);
|
||||||
|
|
||||||
// prepare move overlay
|
// prepare move overlay
|
||||||
const overlayScale = 1;
|
const overlayScale = 1;
|
||||||
this.moveInfoOverlay = new MoveInfoOverlay(this.scene, {
|
this.moveInfoOverlay = new MoveInfoOverlay(this.scene, {
|
||||||
@ -196,12 +202,10 @@ export default class ModifierSelectUiHandler extends AwaitableUiHandler {
|
|||||||
this.options.push(option);
|
this.options.push(option);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Add continue button
|
// Set "Continue" button height based on number of rows in healing items shop
|
||||||
if (this.options.length === 0) {
|
const continueButton = this.continueButtonContainer.getAt(0) as Phaser.GameObjects.Text;
|
||||||
const continueButtonText = addTextObject(this.scene, -24, optionsYOffset - 5, i18next.t("modifierSelectUiHandler:continueNextWaveButton"), TextStyle.MESSAGE);
|
continueButton.y = optionsYOffset - 5;
|
||||||
continueButtonText.setName("text-continue-btn");
|
continueButton.setVisible(this.options.length === 0);
|
||||||
this.continueButtonContainer.add(continueButtonText);
|
|
||||||
}
|
|
||||||
|
|
||||||
for (let m = 0; m < shopTypeOptions.length; m++) {
|
for (let m = 0; m < shopTypeOptions.length; m++) {
|
||||||
const row = m < SHOP_OPTIONS_ROW_LIMIT ? 0 : 1;
|
const row = m < SHOP_OPTIONS_ROW_LIMIT ? 0 : 1;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user