import { GameState } from "../core/game_state"; import { cachebust } from "../core/cachebust"; import { globalConfig, IS_DEMO, THIRDPARTY_URLS } from "../core/config"; import { makeDiv, makeButtonElement, formatSecondsToTimeAgo, waitNextFrame, isSupportedBrowser, makeButton, removeAllChildren, } from "../core/utils"; import { ReadWriteProxy } from "../core/read_write_proxy"; import { HUDModalDialogs } from "../game/hud/parts/modal_dialogs"; import { T } from "../translations"; import { getApplicationSettingById } from "../profile/application_settings"; import { FormElementInput } from "../core/modal_dialog_forms"; import { DialogWithForm } from "../core/modal_dialog_elements"; /** * @typedef {import("../savegame/savegame_typedefs").SavegameMetadata} SavegameMetadata * @typedef {import("../profile/setting_types").EnumSetting} EnumSetting */ /** * Generates a file download * @param {string} filename * @param {string} text */ function generateFileDownload(filename, text) { var element = document.createElement("a"); element.setAttribute("href", "data:text/plain;charset=utf-8," + encodeURIComponent(text)); element.setAttribute("download", filename); element.style.display = "none"; document.body.appendChild(element); element.click(); document.body.removeChild(element); } export class MainMenuState extends GameState { constructor() { super("MainMenuState"); } getInnerHTML() { const bannerHtml = `
${T.demoBanners.intro}
Get the shapez.io standalone! `; return `