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() {
if(localStorage["shuffleImages"] == "on") {
var len = this.resourceManager.enabledImages.length;
var index = Math.floor(Math.random() * len);
if ((index == this.imageIndex || this.lastImageArray.indexOf(index) != -1) && len > 1) {
@ -471,6 +472,10 @@ HuesCore.prototype.randomImage = function() {
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) {

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

Loading…
Cancel
Save