diff --git a/js/client-topbar.js b/js/client-topbar.js index f2eb0d86b..4938ae3ab 100644 --- a/js/client-topbar.js +++ b/js/client-topbar.js @@ -375,9 +375,9 @@ initialize: function (data) { var buf = ''; var muted = !!Dex.prefs('mute'); - buf += '

' + (muted ? '(muted)' : '') + '

'; - buf += '

' + (muted ? '(muted)' : '') + '

'; - buf += '

' + (muted ? '(muted)' : '') + '

'; + buf += '

' + (muted ? '(muted)' : '') + '

'; + buf += '

' + (muted ? '(muted)' : '') + '

'; + buf += '

' + (muted ? '(muted)' : '') + '

'; buf += '

'; this.$el.html(buf).css('min-width', 160); }, @@ -407,9 +407,9 @@ BattleSound.setMute(muted); if (!muted) { - this.$('.effect-volume').html(''); - this.$('.music-volume').html(''); - this.$('.notif-volume').html(''); + this.$('.effect-volume').html(''); + this.$('.music-volume').html(''); + this.$('.notif-volume').html(''); } else { this.$('.effect-volume').html('(muted)'); this.$('.music-volume').html('(muted)'); @@ -422,12 +422,24 @@ BattleSound.setEffectVolume(volume); Storage.prefs('effectvolume', volume); }, + getEffectVolume: function () { + var volume = Dex.prefs('effectvolume'); + return typeof volume === 'number' ? volume : 50; + }, setMusicVolume: function (volume) { BattleSound.setBgmVolume(volume); Storage.prefs('musicvolume', volume); }, + getMusicVolume: function () { + var volume = Dex.prefs('musicvolume'); + return typeof volume === 'number' ? volume : 50; + }, setNotifVolume: function (volume) { Storage.prefs('notifvolume', volume); + }, + getNotifVolume: function () { + var volume = Dex.prefs('notifvolume'); + return typeof volume === 'number' ? volume : 50; } });