diff --git a/css/hues-m.css b/css/hues-m.css index 86d9f2f..56e2d8c 100644 --- a/css/hues-m.css +++ b/css/hues-m.css @@ -367,6 +367,7 @@ width: 100%; background: transparent; border: none; + cursor: pointer; } .hues-m-vol-bar > input { display: block; diff --git a/js/HuesUI.js b/js/HuesUI.js index 101905d..c8bc400 100644 --- a/js/HuesUI.js +++ b/js/HuesUI.js @@ -27,9 +27,6 @@ function HuesUI(parent) { this.songPrev = null; this.songNext = null; - this.volInput = null; - this.volLabel = null; - this.beatCount = null; this.timer = null; this.xBlur = null; @@ -423,6 +420,13 @@ ModernUI.prototype.initUI = function() { var label = document.createElement("div"); label.textContent = "VOL"; label.className = "hues-m-vol-label"; + label.onclick = function() { + if(that.core.soundManager.toggleMute()) { + this.textContent = "(VOL)"; + } else { + this.textContent = "VOL"; + }; + }; volBar.appendChild(label); var infoToggle = document.createElement("div"); diff --git a/js/SoundManager.js b/js/SoundManager.js index b00f5ba..51036d4 100644 --- a/js/SoundManager.js +++ b/js/SoundManager.js @@ -259,10 +259,11 @@ SoundManager.prototype.setMute = function(mute) { } this.core.userInterface.updateVolume(this.gainNode.gain.value); this.mute = mute; + return mute; } SoundManager.prototype.toggleMute = function() { - this.setMute(!this.mute); + return this.setMute(!this.mute); } SoundManager.prototype.decreaseVolume = function() {