You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
30 lines
933 B
30 lines
933 B
/* typehints:start */
|
|
import { PuzzlePlayGameMode } from "../../modes/puzzle_play";
|
|
/* typehints:end */
|
|
|
|
import { makeDiv } from "../../../core/utils";
|
|
import { T } from "../../../translations";
|
|
|
|
import { BaseHUDPart } from "../base_hud_part";
|
|
|
|
export class HUDPuzzleNextPuzzle extends BaseHUDPart {
|
|
createElements(parent) {
|
|
this.element = makeDiv(parent, "ingame_HUD_PuzzleNextPuzzle");
|
|
this.button = document.createElement("button");
|
|
this.button.classList.add("button");
|
|
this.button.innerText = T.ingame.puzzleCompletion.nextPuzzle;
|
|
this.element.appendChild(this.button);
|
|
|
|
this.trackClicks(this.button, this.nextPuzzle);
|
|
}
|
|
|
|
initialize() {}
|
|
|
|
nextPuzzle() {
|
|
const gameMode = /** @type {PuzzlePlayGameMode} */ (this.root.gameMode);
|
|
this.root.gameState.moveToState("PuzzleMenuState", {
|
|
continueQueue: gameMode.nextPuzzles,
|
|
});
|
|
}
|
|
}
|