import { TextualGameState } from "../core/textual_game_state"; import { T } from "../translations"; import { THIRDPARTY_URLS } from "../core/config"; import { cachebust } from "../core/cachebust"; import { getLogoSprite } from "../core/background_resources_loader"; export class AboutState extends TextualGameState { constructor() { super("AboutState"); } getStateHeaderTitle() { return T.about.title; } getMainContentHTML() { return `
shapez.io Logo
${T.about.body .replace("", THIRDPARTY_URLS.github) .replace("", THIRDPARTY_URLS.discord)}
`; } onEnter() { const links = this.htmlElement.querySelectorAll("a[href]"); links.forEach(link => { this.trackClicks( link, () => this.app.platformWrapper.openExternalLink(link.getAttribute("href")), { preventClick: true } ); }); const stateChangers = this.htmlElement.querySelectorAll("a[state]"); console.log(stateChangers); stateChangers.forEach(element => { this.trackClicks(element, () => this.moveToState(element.getAttribute("state")), { preventClick: true, }); }); } getDefaultPreviousState() { return "SettingsState"; } }