rds1983 / Myra

UI Library for MonoGame, FNA and Stride
MIT License
704 stars 93 forks source link

Bug: Changing Slider value from external source does not set position of knob correctly #321

Closed Nornec closed 3 years ago

Nornec commented 3 years ago

Using an external control (such as a mouse wheel) to set a Slider's value given an external property does not set the knob position correctly. Given this situation: Slider minimum = 0.5 Slider maximum = 2

When the external property is set to 0.5 (which sets the Slider's value), the slider shows the knob at the quarter position instead of the actual minimum position, as if the knob were displaying a value of 0.5 out of a range from 0 to 2, where the expectation is the knob should be bottomed out based on a representation of a range between 0.5 and 2.

Dragging the slider normally, using the mouse, sets the position and value of the slider correctly, given the range by the definition of the slider. It is only when the value is set by an external source.