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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user