diff --git a/res/logo.png b/res/logo.png
index 3d3de767..65cbf6a2 100644
Binary files a/res/logo.png and b/res/logo.png differ
diff --git a/res/logo_cn.png b/res/logo_cn.png
index 5ef18416..bec48a66 100644
Binary files a/res/logo_cn.png and b/res/logo_cn.png differ
diff --git a/res/logo_demo.png b/res/logo_demo.png
index 68232780..ab7f3057 100644
Binary files a/res/logo_demo.png and b/res/logo_demo.png differ
diff --git a/res/logo_wegame.png b/res/logo_wegame.png
index ac9092b3..06237666 100644
Binary files a/res/logo_wegame.png and b/res/logo_wegame.png differ
diff --git a/src/css/states/main_menu.scss b/src/css/states/main_menu.scss
index 5d677782..d7e08c43 100644
--- a/src/css/states/main_menu.scss
+++ b/src/css/states/main_menu.scss
@@ -160,6 +160,7 @@
transition-property: opacity, transform;
position: relative;
@include S(border-radius, $globalBorderRadius);
+ color: transparent;
&:hover {
opacity: 0.9;
@@ -202,7 +203,8 @@
@include S(padding-top, 20px);
img {
- @include S(width, 300px);
+ @include S(width, 710px / 2.2);
+ @include S(height, 180 / 2.2px);
}
position: relative;
@include S(left, -8px);
@@ -731,7 +733,8 @@
img {
transition: opacity 0.12s ease-in-out;
- @include S(width, 80px);
+ @include S(width, 82px);
+ @include S(height, 25px);
filter: invert(100%);
opacity: 0.6;
}
diff --git a/src/html/index.html b/src/html/index.html
index bcc88b3b..a4a0fff4 100644
--- a/src/html/index.html
+++ b/src/html/index.html
@@ -1,5 +1,5 @@
-
+
shapez Demo - Factory Automation Game
@@ -8,7 +8,7 @@
diff --git a/src/js/application.js b/src/js/application.js
index 70aa4e4b..78d4518d 100644
--- a/src/js/application.js
+++ b/src/js/application.js
@@ -233,7 +233,6 @@ export class Application {
// Unload events
window.addEventListener("beforeunload", this.onBeforeUnload.bind(this), true);
- window.addEventListener("unload", this.onUnload.bind(this), true);
document.addEventListener(pageVisibilityEventName, this.handleVisibilityChange.bind(this), false);
@@ -331,21 +330,6 @@ export class Application {
this.sound.onPageRenderableStateChanged(renderable);
}
- /**
- * Internal unload handler
- */
- onUnload(event) {
- if (!this.unloaded) {
- logSection("UNLOAD HANDLER", "#f77");
- this.unloaded = true;
- const currentState = this.stateMgr.getCurrentState();
- if (currentState) {
- currentState.onBeforeExit();
- }
- this.deinitialize();
- }
- }
-
/**
* Internal before-unload handler
*/
diff --git a/src/js/core/game_state.js b/src/js/core/game_state.js
index b67ff7ef..d71d3e52 100644
--- a/src/js/core/game_state.js
+++ b/src/js/core/game_state.js
@@ -129,11 +129,6 @@ export class GameState {
*/
onLeave() {}
- /**
- * Callback before leaving the game state or when the page is unloaded
- */
- onBeforeExit() {}
-
/**
* Callback when the app got paused (on android, this means in background)
*/
@@ -295,13 +290,6 @@ export class GameState {
this.asyncChannel.cancelAll();
}
- /**
- * Internal callback *before* the state is left. Also is called on page unload
- */
- internalOnBeforeExitCallback() {
- this.onBeforeExit();
- }
-
/**
* Internal app pause callback
*/
diff --git a/src/js/states/ingame.js b/src/js/states/ingame.js
index 399617e2..d950553c 100644
--- a/src/js/states/ingame.js
+++ b/src/js/states/ingame.js
@@ -116,14 +116,6 @@ export class InGameState extends GameState {
return MUSIC.theme;
}
- onBeforeExit() {
- // logger.log("Saving before quitting");
- // return this.doSave().then(() => {
- // logger.log(this, "Successfully saved");
- // // this.stageDestroyed();
- // });
- }
-
onAppPause() {
// if (this.stage === stages.s10_gameRunning) {
// logger.log("Saving because app got paused");
diff --git a/src/js/states/main_menu.js b/src/js/states/main_menu.js
index a4fcb406..067c9934 100644
--- a/src/js/states/main_menu.js
+++ b/src/js/states/main_menu.js
@@ -25,8 +25,6 @@ import { T } from "../translations";
const trim = require("trim");
-let firstPlayForwarded = false;
-
/**
* @typedef {import("../savegame/savegame_typedefs").SavegameMetadata} SavegameMetadata
* @typedef {import("../profile/setting_types").EnumSetting} EnumSetting
@@ -88,7 +86,7 @@ export class MainMenuState extends GameState {
? `-${globalConfig.currentDiscount}%!`
: ""
}
-
+ Play shapez on Steam
${!G_IS_STEAM_DEMO ? `` : ""}
@@ -111,7 +109,10 @@ export class MainMenuState extends GameState {
-
+
${/*showUpdateLabel ? `
MODS UPDATE!` : ""*/ ""}
@@ -234,7 +235,11 @@ export class MainMenuState extends GameState {
${showExternalLinks ? `${T.mainMenu.helpTranslate}` : ""}
@@ -571,21 +576,25 @@ export class MainMenuState extends GameState {
const deleteButton = document.createElement("button");
deleteButton.classList.add("styledButton", "deleteGame");
+ deleteButton.setAttribute("aria-label", "Delete");
elem.appendChild(deleteButton);
const downloadButton = document.createElement("button");
downloadButton.classList.add("styledButton", "downloadGame");
+ downloadButton.setAttribute("aria-label", "Download");
elem.appendChild(downloadButton);
if (!G_WEGAME_VERSION) {
const renameButton = document.createElement("button");
renameButton.classList.add("styledButton", "renameGame");
+ renameButton.setAttribute("aria-label", "Rename Savegame");
name.appendChild(renameButton);
this.trackClicks(renameButton, () => this.requestRenameSavegame(games[i]));
}
const resumeButton = document.createElement("button");
resumeButton.classList.add("styledButton", "resumeGame");
+ resumeButton.setAttribute("aria-label", "Resumee");
elem.appendChild(resumeButton);
this.trackClicks(deleteButton, () => this.deleteGame(games[i]));
diff --git a/src/js/states/preload.js b/src/js/states/preload.js
index cfec7875..3d9c2370 100644
--- a/src/js/states/preload.js
+++ b/src/js/states/preload.js
@@ -130,6 +130,10 @@ export class PreloadState extends GameState {
return this.app.settings.updateLanguage(language);
}
})
+ .then(() => {
+ document.documentElement.setAttribute("lang", this.app.settings.getLanguage());
+ })
+
.then(() => {
const language = this.app.settings.getLanguage();
updateApplicationLanguage(language);