This commit is contained in:
Phantom
2026-05-17 12:21:36 +02:00
parent 3de20d4a5c
commit 0bb57793bb
+2 -10
View File
@@ -423,16 +423,8 @@ public class Slider : ContainerControl
return this;
}
switch (Direction)
{
case SliderDirection.HorizontalRight or SliderDirection.VerticalDown:
Value += (_keyOrGamepadPosition < _thumbCenter ? -1 : 1) * 10;
break;
case SliderDirection.HorizontalLeft or SliderDirection.VerticalUp:
Value -= (_keyOrGamepadPosition < _thumbCenter ? -1 : 1) * 10;
break;
default: break;
}
var SliderPosition = (Direction == SliderDirection.HorizontalRight || Direction == SliderDirection.VerticalDown) ? _keyOrGamepadPosition : - _keyOrGamepadPosition;
Value += (SliderPosition < _thumbCenter ? -1 : 1) * 10;
return base.OnNavigate(direction, location, caller, visited);
}