diff options
author | Alex Xu <alex_y_xu@yahoo.ca> | 2013-07-29 21:09:28 -0400 |
---|---|---|
committer | Alex Xu <alex_y_xu@yahoo.ca> | 2013-07-29 21:09:28 -0400 |
commit | 27e86364232ca85334f20f6491d240b74e2ef014 (patch) | |
tree | a8b44616dffc53b940e9f85849ed44b2e527d8c1 /www | |
parent | 588a624546ee932e2ccf634e1e3bd20087e61b2c (diff) | |
download | html5ks-27e86364232ca85334f20f6491d240b74e2ef014.tar.xz html5ks-27e86364232ca85334f20f6491d240b74e2ef014.zip |
fix misc. bugs
Diffstat (limited to 'www')
-rw-r--r-- | www/css/index.css | 4 | ||||
-rw-r--r-- | www/index.html | 2 | ||||
-rw-r--r-- | www/js/api.js | 9 | ||||
-rw-r--r-- | www/js/html5ks.js | 4 | ||||
-rw-r--r-- | www/js/menu.js | 6 |
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); |