Adding in a step picker, so that the user can choose how much the volume should change with each tick of the encoder

This commit is contained in:
2023-09-10 22:07:11 -06:00
parent b57ea24b11
commit 84a9a89074
7 changed files with 2166 additions and 10 deletions

View File

@@ -19,6 +19,9 @@ public class DialAction : EncoderBase
[JsonProperty("fallbackBehavior")]
public FallbackBehavior FallbackBehavior { get; set; }
[JsonProperty("stepSize")]
public int StepSize { get; set; }
public static PluginSettings CreateDefaultSettings()
{
PluginSettings instance = new PluginSettings();
@@ -119,7 +122,7 @@ public class DialAction : EncoderBase
{
if (_currentAudioSession != null)
{
_currentAudioSession.IncrementVolumeLevel(1, payload.Ticks);
_currentAudioSession.IncrementVolumeLevel(settings.StepSize, payload.Ticks);
await UpdateStateIfNeeded();
}
else