Minor cleanups, add favicon

serial
William Toohey 10 years ago
parent 05a883a9e0
commit 5acc8806fe
  1. BIN
      favicon.ico
  2. 5
      js/HuesCanvas.js
  3. 12
      js/HuesCore.js

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

@ -226,7 +226,7 @@ HuesCanvas.prototype.doBlackout = function(whiteout) {
this.blackout = true; this.blackout = true;
this.needsRedraw = true; this.needsRedraw = true;
if(localStorage["blackoutUI"] == "on") { if(localStorage["blackoutUI"] == "on") {
core.userInterface.hide(); this.core.userInterface.hide();
} }
} }
@ -236,13 +236,12 @@ HuesCanvas.prototype.clearBlackout = function() {
this.blackoutTimeout = 0; this.blackoutTimeout = 0;
this.needsRedraw = true; this.needsRedraw = true;
if(localStorage["blackoutUI"] == "on") { if(localStorage["blackoutUI"] == "on") {
core.userInterface.show(); this.core.userInterface.show();
} }
} }
HuesCanvas.prototype.doShortBlackout = function(beatTime) { HuesCanvas.prototype.doShortBlackout = function(beatTime) {
this.doBlackout(); this.doBlackout();
// GetRandomWaifu(); TODO IMPLEMENT IN CORE INSTEAD
this.blackoutTimeout = this.aContext.currentTime + beatTime / 1.7; this.blackoutTimeout = this.aContext.currentTime + beatTime / 1.7;
// looks better if we go right to black // looks better if we go right to black
this.blackoutStart = 0; this.blackoutStart = 0;

@ -60,7 +60,8 @@ HuesCore = function(defaults) {
document.onkeydown = function(e){ document.onkeydown = function(e){
e = e || window.event; e = e || window.event;
// Ignore modifiers so we don't steal other events // 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; return true;
} }
var key = e.keyCode || e.which; var key = e.keyCode || e.which;
@ -486,8 +487,15 @@ HuesCore.prototype.settingsUpdated = function() {
this.colours = this.weedColours; this.colours = this.weedColours;
break; break;
} }
if(localStorage["blackoutUI"] == "on") { switch (localStorage["blackoutUI"]) {
case "off":
this.userInterface.show(); this.userInterface.show();
break;
case "on":
if(this.renderer.blackout) {
this.userInterface.hide();
}
break;
} }
/*if (this.autoSong == "off" && !(this.settings.autosong == "off")) { /*if (this.autoSong == "off" && !(this.settings.autosong == "off")) {
console.log("Resetting loopCount since AutoSong was enabled"); console.log("Resetting loopCount since AutoSong was enabled");

Loading…
Cancel
Save