Add ability to not shuffle images in full auto

master
William Toohey 10 years ago
parent 9873b724cd
commit fb53f1e900
  1. 5
      js/HuesCore.js
  2. 26
      js/HuesSettings.js

@ -459,6 +459,7 @@ HuesCore.prototype.resetAudio = function() {
}; };
HuesCore.prototype.randomImage = function() { HuesCore.prototype.randomImage = function() {
if(localStorage["shuffleImages"] == "on") {
var len = this.resourceManager.enabledImages.length; var len = this.resourceManager.enabledImages.length;
var index = Math.floor(Math.random() * len); var index = Math.floor(Math.random() * len);
if ((index == this.imageIndex || this.lastImageArray.indexOf(index) != -1) && len > 1) { if ((index == this.imageIndex || this.lastImageArray.indexOf(index) != -1) && len > 1) {
@ -471,6 +472,10 @@ HuesCore.prototype.randomImage = function() {
this.lastImageArray.shift(); this.lastImageArray.shift();
} }
} }
} else { // jk, not actually random
var img=(this.imageIndex + 1) % this.resourceManager.enabledImages.length;
this.setImage(img);
}
}; };
HuesCore.prototype.setImage = function(index) { HuesCore.prototype.setImage = function(index) {

@ -52,6 +52,7 @@ HuesSettings.prototype.defaultSettings = {
blackoutUI: "off", blackoutUI: "off",
playBuildups: "on", playBuildups: "on",
visualiser: "off", visualiser: "off",
shuffleImages: "on",
autoSong: "off", autoSong: "off",
autoSongDelay: 5, // loops or minutes depending on autoSong value autoSongDelay: 5, // loops or minutes depending on autoSong value
autoSongShuffle: "on", autoSongShuffle: "on",
@ -82,13 +83,7 @@ HuesSettings.prototype.settingsCategories = {
"autoSong", "autoSong",
"autoSongShuffle", "autoSongShuffle",
"autoSongFadeout", "autoSongFadeout",
"smartAlign" "playBuildups"
],
"Interface" : [
"currentUI",
"colourSet",
"blackoutUI",
"visualiser"
], ],
"Graphics" : [ "Graphics" : [
"blurAmount", "blurAmount",
@ -96,9 +91,16 @@ HuesSettings.prototype.settingsCategories = {
"blurQuality", "blurQuality",
"trippyMode" "trippyMode"
], ],
"Audio" : [ "Visuals" : [
"playBuildups" "smartAlign",
] "shuffleImages",
"colourSet",
"visualiser"
],
"Interface" : [
"currentUI",
"blackoutUI",
],
}; };
HuesSettings.prototype.settingsOptions = { HuesSettings.prototype.settingsOptions = {
@ -181,6 +183,10 @@ HuesSettings.prototype.settingsOptions = {
trippyMode : { trippyMode : {
name : "Trippy Mode", name : "Trippy Mode",
options : ["off", "on"] options : ["off", "on"]
},
shuffleImages : {
name : "Shuffle images",
options : ["off", "on"]
} }
}; };

Loading…
Cancel
Save