Fix language choose

This commit is contained in:
tobspr 2020-10-08 11:06:56 +02:00
parent b54ecdc906
commit 7744712f39
4 changed files with 174 additions and 163 deletions

View File

@ -1,8 +1,10 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- Generator: Adobe Illustrator 19.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" id="Layer_1" x="0px" y="0px" viewBox="0 0 512 512" style="enable-background:new 0 0 512 512;" xml:space="preserve">
<path style="fill:#FF4B55;" d="M400,0H112C50.144,0,0,50.144,0,112v288c0,61.856,50.144,112,112,112h288 c61.856,0,112-50.144,112-112V112C512,50.144,461.856,0,400,0z"/>
<polygon style="fill:#F5F5F5;" points="512,229.517 211.862,229.517 211.862,0 158.897,0 158.897,229.517 0,229.517 0,282.483 158.897,282.483 158.897,512 211.862,512 211.862,282.483 512,282.483 "/>
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
viewBox="0 0 512 512" style="enable-background:new 0 0 512 512;" xml:space="preserve">
<rect style="fill:#FF4B55;" width="512" height="512"/>
<polygon style="fill:#F5F5F5;" points="512,229.517 211.862,229.517 211.862,0 158.897,0 158.897,229.517 0,229.517 0,282.483
158.897,282.483 158.897,512 211.862,512 211.862,282.483 512,282.483 "/>
<g>
</g>
<g>

Before

Width:  |  Height:  |  Size: 858 B

After

Width:  |  Height:  |  Size: 786 B

View File

@ -110,4 +110,11 @@ export const LANGUAGES = {
code: "sv",
region: "",
},
"da": {
name: "Dansk",
data: require("./built-temp/base-da.json"),
code: "da",
region: "",
},
};

View File

@ -320,20 +320,23 @@ export class MainMenuState extends GameState {
});
optionSelected.add(value => {
this.app.settings.updateLanguage(value);
this.app.settings.updateLanguage(value).then(() => {
if (setting.restartRequired) {
if (this.app.platformWrapper.getSupportsRestart()) {
this.app.platformWrapper.performRestart();
} else {
this.dialogs.showInfo(T.dialogs.restartRequired.title, T.dialogs.restartRequired.text, [
"ok:good",
]);
this.dialogs.showInfo(
T.dialogs.restartRequired.title,
T.dialogs.restartRequired.text,
["ok:good"]
);
}
}
if (setting.changeCb) {
setting.changeCb(this.app, value);
}
});
// Update current icon
this.htmlElement.querySelector("button.languageChoose").setAttribute("data-languageIcon", value);

View File

@ -3,8 +3,7 @@ steamPage:
kombinování čím dál složitějších tvarů na nekonečné mapě.
discordLinkShort: Oficiální Discord
intro: >-
Shapez.io je relaxační hra, ve které musíte stavět továrny pro
automatizaci výroby geometrických tvarů.
Shapez.io je relaxační hra, ve které musíte stavět továrny pro automatizaci výroby geometrických tvarů.
Jak se zvyšuje úroveň, tvary se stávají stále složitějšími a vy se musíte rozšířit po nekonečné mapě.