Skip to content

Add volume slider#201

Open
adotdong29 wants to merge 1 commit intoeltoder:mainfrom
adotdong29:volume-slider
Open

Add volume slider#201
adotdong29 wants to merge 1 commit intoeltoder:mainfrom
adotdong29:volume-slider

Conversation

@adotdong29
Copy link
Copy Markdown

@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.

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

1 participant