1
0
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:
tobspr
2020-05-17 13:24:47 +02:00
parent 53386e1cd9
commit 68769cb7ef
35 changed files with 243 additions and 83 deletions

View File

@@ -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,
});
}
/**

View File

@@ -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", {

View File

@@ -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>