Fixed an issue with adjusting SliderComponent values using the controller D-pad.

This commit is contained in:
Leon Styhre 2021-01-23 15:43:48 +01:00
parent d75d2f41d1
commit 0dfe52586c

View file

@ -40,6 +40,7 @@ SliderComponent::SliderComponent(
bool SliderComponent::input(InputConfig* config, Input input) bool SliderComponent::input(InputConfig* config, Input input)
{ {
if (input.value != 0) {
if (config->isMappedLike("left", input)) { if (config->isMappedLike("left", input)) {
if (input.value) if (input.value)
setValue(mValue - mSingleIncrement); setValue(mValue - mSingleIncrement);
@ -56,6 +57,10 @@ bool SliderComponent::input(InputConfig* config, Input input)
mMoveAccumulator = -MOVE_REPEAT_DELAY; mMoveAccumulator = -MOVE_REPEAT_DELAY;
return true; return true;
} }
}
else {
mMoveRate = 0;
}
return GuiComponent::input(config, input); return GuiComponent::input(config, input);
} }