mirror of
https://github.com/tobspr/shapez.io.git
synced 2026-03-02 03:39:21 +00:00
Dark mode support and much other stuff
This commit is contained in:
@@ -148,7 +148,10 @@ export class InGameState extends GameState {
|
||||
* Goes back to the settings state
|
||||
*/
|
||||
goToSettings() {
|
||||
this.saveThenGoToState("SettingsState");
|
||||
this.saveThenGoToState("SettingsState", {
|
||||
backToStateId: this.key,
|
||||
backToStatePayload: this.creationPayload,
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -32,6 +32,8 @@ export class MainMenuState extends GameState {
|
||||
|
||||
return `
|
||||
|
||||
<button class="settingsButton"></button>
|
||||
|
||||
<video autoplay muted loop class="fullscreenBackgroundVideo">
|
||||
<source src="${cachebust("res/bg_render.webm")}" type="video/webm">
|
||||
</video>
|
||||
@@ -191,6 +193,7 @@ export class MainMenuState extends GameState {
|
||||
});
|
||||
}
|
||||
|
||||
this.trackClicks(qs(".settingsButton"), this.onSettingsButtonClicked);
|
||||
this.renderSavegames();
|
||||
}
|
||||
|
||||
@@ -281,6 +284,10 @@ export class MainMenuState extends GameState {
|
||||
});
|
||||
}
|
||||
|
||||
onSettingsButtonClicked() {
|
||||
this.moveToState("SettingsState");
|
||||
}
|
||||
|
||||
onPlayButtonClicked() {
|
||||
const savegame = this.app.savegameMgr.createNewSavegame();
|
||||
|
||||
@@ -288,7 +295,7 @@ export class MainMenuState extends GameState {
|
||||
|
||||
if (G_IS_DEV) {
|
||||
// TODO
|
||||
this.moveToState("SettingsState");
|
||||
// this.moveToState("SettingsState");
|
||||
}
|
||||
|
||||
this.moveToState("InGameState", {
|
||||
|
||||
@@ -19,12 +19,12 @@ export class SettingsState extends TextualGameState {
|
||||
${
|
||||
this.app.platformWrapper.getSupportsKeyboard()
|
||||
? `
|
||||
<button class="styledButton editKeybindings">KEYBINDING TODO</button>
|
||||
<button class="styledButton editKeybindings">Keybindings</button>
|
||||
`
|
||||
: ""
|
||||
}
|
||||
|
||||
<button class="styledButton changelog">CHANGELOG TODO</button>
|
||||
<button class="styledButton changelog">Changelog</button>
|
||||
|
||||
|
||||
</div>
|
||||
@@ -33,7 +33,7 @@ export class SettingsState extends TextualGameState {
|
||||
${this.getSettingsHtml()}
|
||||
<div class="versionbar">
|
||||
<div class="buildVersion">${T.global.loading} ...</div>
|
||||
<button class="styledButton copyright">COPYRIGHT TODO</button>
|
||||
<button class="styledButton copyright">Copyright & Licenses</button>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user