From 04a7d8029c7279267bd03185cdb00b289fb74895 Mon Sep 17 00:00:00 2001 From: Nick Oates Date: Fri, 18 Oct 2024 18:15:22 -0700 Subject: [PATCH] VolumeScroll: Reset settings if invalid entered + update README --- README.md | 2 +- plugins/VolumeScroll/src/Settings.ts | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index b4f52a4..5f17403 100644 --- a/README.md +++ b/README.md @@ -108,7 +108,7 @@ https://inrixia.github.io/neptune-plugins/VolumeScroll ``` -Lets you scroll on the volume icon to change the volume by 10%. +Lets you scroll on the volume icon to change the volume by 10%. Can configure the step size, including different amounts for when you hold SHIFT. ![image](https://github.com/user-attachments/assets/3a795666-2ed3-4feb-8d42-9374d4f6edd3) diff --git a/plugins/VolumeScroll/src/Settings.ts b/plugins/VolumeScroll/src/Settings.ts index fcdcf1f..d6feff2 100644 --- a/plugins/VolumeScroll/src/Settings.ts +++ b/plugins/VolumeScroll/src/Settings.ts @@ -11,7 +11,7 @@ export const Settings = () => html`<${TextInput} text=${settings.changeBy} onText=${(text: string) => { const num = parseInt(text); - if (isNaN(num)) return; + if (isNaN(num)) return (settings.changeBy = 10); settings.changeBy = num; }} title="Percent to change volume by" @@ -20,7 +20,7 @@ export const Settings = () => html`<${TextInput} text=${settings.changeByShift} onText=${(text: string) => { const num = parseInt(text); - if (isNaN(num)) return; + if (isNaN(num)) return (settings.changeByShift = 10); settings.changeByShift = num; }} title="Percent to change volume by when shift is held"