summaryrefslogtreecommitdiff
path: root/www
diff options
context:
space:
mode:
Diffstat (limited to 'www')
-rw-r--r--www/css/index.css4
-rw-r--r--www/index.html2
-rw-r--r--www/js/api.js9
-rw-r--r--www/js/html5ks.js4
-rw-r--r--www/js/menu.js6
5 files changed, 14 insertions, 11 deletions
diff --git a/www/css/index.css b/www/css/index.css
index 5b12d77..09c818d 100644
--- a/www/css/index.css
+++ b/www/css/index.css
@@ -20,6 +20,7 @@
-webkit-user-select: none;
-ms-user-select: none;
user-select: none;
+ outline: none;
}
body {
margin: 0;
@@ -117,6 +118,9 @@ html.no-js #gotit {
#container {
overflow: hidden;
}
+#show {
+ height: 100%;
+}
#show img {
position: absolute;
}
diff --git a/www/index.html b/www/index.html
index 9550a64..6070200 100644
--- a/www/index.html
+++ b/www/index.html
@@ -83,7 +83,7 @@
<label><input type="range" min="0.0" max="1.0" step="0.001" class="option" id="autoModeDelay"> <span class="tr">Auto mode delay</span></label>
<label><input type="range" min="0.0" max="1.0" step="0.001" class="option" id="musicVolume"> <span class="tr">Music volume</span></label>
- <label><input type="range" min="0.0" max="1.0" step="0.001" class="option" id="sfxVolume"> <span class="tr">SFX volume</span> <span id="test-sfx" class="button"><img src="dump/ui/bt-musicplay.png"> Test</span></label>
+ <label><input type="range" min="0.0" max="1.0" step="0.001" class="option" id="soundVolume"> <span class="tr">SFX volume</span> <span id="test-sound" class="button"><img src="dump/ui/bt-musicplay.png"> Test</span></label>
</div>
<div id="return" class="button" style="position: absolute; bottom: 15px; right: 20px;">
<img src="dump/ui/bt-return.png">
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);