Skip to content

Add volume slider#201

Merged
eltoder merged 2 commits into
eltoder:mainfrom
adotdong29:volume-slider
May 7, 2026
Merged

Add volume slider#201
eltoder merged 2 commits into
eltoder:mainfrom
adotdong29:volume-slider

Conversation

@adotdong29
Copy link
Copy Markdown
Contributor

@adotdong29 adotdong29 commented May 3, 2026

Hi! I noticed #60 was tagged good first issue and figured I'd take a stab. Long-time setwithforks player, first-time contributor. I'm happy to iterate on this if anything needs adjusting, or recieve any feedback!

Closes #60.

Behavior

  • Replaces the binary "Mute / Unmute sound" menu item with a 0-100 slider plus a speaker icon button.
  • The slider sets the actual playback volume of the success/fail SFX through use-sound's volume option, so 30% really plays at 30%.
  • The speaker icon and the existing Ctrl+Shift+S shortcut both toggle mute. They remember the last non-zero level so toggling back doesn't snap to 100%.
  • Old "on" / "off" values stored in localStorage are migrated transparently to 100 / 0 the first time parseVolume reads them. Existing users see no change unless they move the slider.

Notes

  • Step is set to 5 on the slider — felt about right for a quick mouse-drag, but easy to drop to 1 if you'd prefer finer control.
  • Left the Help page shortcut text as "Mute or unmute sound" since the binding still does that. Happy to rename it if you'd rather call it "Toggle mute" or similar.

Comment thread src/components/Navbar.js Outdated
Comment thread src/components/Navbar.js Outdated
@eltoder eltoder merged commit 4e5438f into eltoder:main May 7, 2026
@eltoder
Copy link
Copy Markdown
Owner

eltoder commented May 7, 2026

@adotdong29 This looks great, but tbh I doubt that anyone really wants a volume slider. The issue was opened a while ago because someone mentioned it on discord, but most people play without sound and didn't care. That said, there are many things that would indeed be nice to add. If you are up to working on something else, please let me know.

@adotdong29
Copy link
Copy Markdown
Contributor Author

@eltoder I would be happy to assist with any other tasks or features!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add volume slider

2 participants