rot.js volume step simplify

This commit is contained in:
uwaa 2025-01-27 13:15:13 +00:00
parent e323fa404b
commit 8c44100220

View file

@ -378,16 +378,8 @@
localStorage.audiomuted = audio.muted = musicmute.checked; localStorage.audiomuted = audio.muted = musicmute.checked;
playMusic(); playMusic();
}) })
volumeStepDwn.addEventListener('click', () => { volumeStepDwn.addEventListener('click', () => volumeAdd(-0.05))
var e = audio.volume - 0.05; volumeStepUp.addEventListener('click', () => volumeAdd(0.05))
if (e < 0) e = 0;
volumeSet(e);
})
volumeStepUp.addEventListener('click', () => {
var e = audio.volume + 0.05;
if (e > 1) e = 1;
volumeSet(e);
})
updateVolumeLabel(); updateVolumeLabel();
} }