Add adjustment step setting for SliderBar
#6142
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Picture this scenario: you have a bindable which you want to bind to a slider bar control to allow user adjustment. Generally, when adjusting via a slider bar, adjustments should be sane values, but a user might want to override with a textbox input also bound the to the same bindable.
Using precision becomes non-feasible because it will limit the bindable across all usages (foreshadowing ppy/osu#25862). Like with other UI frameworks, we want to set a tick/step value which governs inputs made via the slider bar.
There's an argument for "fix this locally" but I guarantee we will run into this scenario more and more, especially after we make textbox input for slider config settings more common and users ask for higher precision.
It's also hard to fix locally for one specific reason: when the value is set to a higher precision than we want to support from user input, having multiple bindables to work around this would mean that the slider bar doesn't show the correct value (unless its precision was updated dynamically?).