diff --git a/favicon.ico b/favicon.ico new file mode 100644 index 0000000..cb01422 Binary files /dev/null and b/favicon.ico differ diff --git a/js/HuesCanvas.js b/js/HuesCanvas.js index 9cd0d32..4f9cb22 100644 --- a/js/HuesCanvas.js +++ b/js/HuesCanvas.js @@ -226,7 +226,7 @@ HuesCanvas.prototype.doBlackout = function(whiteout) { this.blackout = true; this.needsRedraw = true; if(localStorage["blackoutUI"] == "on") { - core.userInterface.hide(); + this.core.userInterface.hide(); } } @@ -236,13 +236,12 @@ HuesCanvas.prototype.clearBlackout = function() { this.blackoutTimeout = 0; this.needsRedraw = true; if(localStorage["blackoutUI"] == "on") { - core.userInterface.show(); + this.core.userInterface.show(); } } HuesCanvas.prototype.doShortBlackout = function(beatTime) { this.doBlackout(); - // GetRandomWaifu(); TODO IMPLEMENT IN CORE INSTEAD this.blackoutTimeout = this.aContext.currentTime + beatTime / 1.7; // looks better if we go right to black this.blackoutStart = 0; diff --git a/js/HuesCore.js b/js/HuesCore.js index 9a22a2a..ef88b90 100644 --- a/js/HuesCore.js +++ b/js/HuesCore.js @@ -60,7 +60,8 @@ HuesCore = function(defaults) { document.onkeydown = function(e){ e = e || window.event; // Ignore modifiers so we don't steal other events - if (e.shiftKey || e.altKey || e.ctrlKey || e.metaKey) { + // Shift is actually used, and is thus ignored here + if (e.altKey || e.ctrlKey || e.metaKey) { return true; } var key = e.keyCode || e.which; @@ -486,8 +487,15 @@ HuesCore.prototype.settingsUpdated = function() { this.colours = this.weedColours; break; } - if(localStorage["blackoutUI"] == "on") { + switch (localStorage["blackoutUI"]) { + case "off": this.userInterface.show(); + break; + case "on": + if(this.renderer.blackout) { + this.userInterface.hide(); + } + break; } /*if (this.autoSong == "off" && !(this.settings.autosong == "off")) { console.log("Resetting loopCount since AutoSong was enabled");