aboutsummaryrefslogtreecommitdiff
path: root/views/script/settings_load.js
diff options
context:
space:
mode:
authorMinteck <nekostarfan@gmail.com>2021-06-05 19:27:48 +0200
committerMinteck <nekostarfan@gmail.com>2021-06-05 19:27:48 +0200
commit8cf5cefe6e91a5a1ed6eeaae4d94760d84c304a6 (patch)
tree7096b67b189c0220826123c7d5b121752545d140 /views/script/settings_load.js
downloadkartik-client-8cf5cefe6e91a5a1ed6eeaae4d94760d84c304a6.tar.gz
kartik-client-8cf5cefe6e91a5a1ed6eeaae4d94760d84c304a6.tar.bz2
kartik-client-8cf5cefe6e91a5a1ed6eeaae4d94760d84c304a6.zip
Presque sortie du jeu
Diffstat (limited to 'views/script/settings_load.js')
-rw-r--r--views/script/settings_load.js25
1 files changed, 25 insertions, 0 deletions
diff --git a/views/script/settings_load.js b/views/script/settings_load.js
new file mode 100644
index 0000000..358f9b1
--- /dev/null
+++ b/views/script/settings_load.js
@@ -0,0 +1,25 @@
+info("OptnWindow", "Restoring settings...");
+
+if (require('@electron/remote').getCurrentWindow().music) {
+ if (location.search === "?credits") {
+ require('electron').ipcRenderer.send('newmusic', kresources.music['title'].file);
+ }
+ document.getElementById("setting-music").innerText = lang.settings.yes;
+} else {
+ document.getElementById("setting-music").innerText = lang.settings.no;
+}
+
+if (require('@electron/remote').getCurrentWindow().voice) {
+ document.getElementById("setting-voice").innerText = lang.settings.yes;
+} else {
+ document.getElementById("setting-voice").innerText = lang.settings.no;
+}
+
+slang = require('@electron/remote').getCurrentWindow().lp;
+langs = require('../lang/languages.json');
+
+if (Object.keys(langs).includes(slang)) {
+ document.getElementById("setting-lang").innerText = langs[slang];
+} else {
+ document.getElementById("setting-lang").innerText = slang;
+} \ No newline at end of file