diff options
Diffstat (limited to 'www/js')
-rw-r--r-- | www/js/api.js | 9 | ||||
-rw-r--r-- | www/js/html5ks.js | 4 | ||||
-rw-r--r-- | www/js/menu.js | 6 |
3 files changed, 9 insertions, 10 deletions
diff --git a/www/js/api.js b/www/js/api.js index 295b472..4869391 100644 --- a/www/js/api.js +++ b/www/js/api.js @@ -172,10 +172,10 @@ window.html5ks.api = { } deferred.resolve(action); return deferred.promise; - }, + }, - scene: function (type, name) { + scene: function () { html5ks.elements.show.innerHTML = ""; return this.show.apply(this, arguments); }, @@ -224,7 +224,7 @@ window.html5ks.api = { deferred.reject(); }; var nom = name; - if (type) { + if (type && type !== "None") { nom = name + "_" + type; } var image = html5ks.data.images[nom]; @@ -233,9 +233,8 @@ window.html5ks.api = { if (image.substring(0, 1) === "#") { el = document.createElement("div"); el.style.backgroundColor = image; - el.style.width = "100%"; el.style.height = "100%"; - el.src = ""; + html5ks.elements.show.appendChild(el); deferred.resolve(); return deferred.promise; } diff --git a/www/js/html5ks.js b/www/js/html5ks.js index 42542fd..a611d42 100644 --- a/www/js/html5ks.js +++ b/www/js/html5ks.js @@ -18,7 +18,7 @@ window.html5ks = { textSpeed: 0.5, autoModeDelay: 0.2, musicVolume: 1, - sfxVolume: 1, + soundVolume: 1, language: "en" }; var loaded = localStorage.persistent ? JSON.parse(localStorage.persistent) : {}; @@ -198,7 +198,7 @@ window.html5ks = { }); }); }, - fetch: function (type, name) { + fetch: function (type) { var deferred = when.defer(); var xhr = new XMLHttpRequest(); switch (type) { diff --git a/www/js/menu.js b/www/js/menu.js index 1a3e712..62d1357 100644 --- a/www/js/menu.js +++ b/www/js/menu.js @@ -67,8 +67,8 @@ html5ks.scale(); break; case "musicVolume": - case "sfxVolume": - html5ks.api.set_volume(target.value, 0, target.id.replace("Volume", "")) + case "soundVolume": + html5ks.api.set_volume(target.value, 0, target.id.replace("Volume", "")); break; } }; @@ -110,7 +110,7 @@ this._imachine_loaded = true; }.bind(this)); - this.elements.dialog.return.addEventListener("click", function (e) { + this.elements.dialog.return.addEventListener("click", function () { html5ks.menu.activeDialog.style.display = "none"; html5ks.menu.elements.dialogs.style.display = "none"; }, false); |