summaryrefslogtreecommitdiff
path: root/www/js
diff options
context:
space:
mode:
authorAlex Xu <alex_y_xu@yahoo.ca>2013-07-29 21:09:28 -0400
committerAlex Xu <alex_y_xu@yahoo.ca>2013-07-29 21:09:28 -0400
commit27e86364232ca85334f20f6491d240b74e2ef014 (patch)
treea8b44616dffc53b940e9f85849ed44b2e527d8c1 /www/js
parent588a624546ee932e2ccf634e1e3bd20087e61b2c (diff)
downloadhtml5ks-27e86364232ca85334f20f6491d240b74e2ef014.tar.xz
html5ks-27e86364232ca85334f20f6491d240b74e2ef014.zip
fix misc. bugs
Diffstat (limited to 'www/js')
-rw-r--r--www/js/api.js9
-rw-r--r--www/js/html5ks.js4
-rw-r--r--www/js/menu.js6
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);