Refactor: Allow to explicitly set the range on the slider UI element #107406

Merged
Christoph Lendenfeld merged 5 commits from ChrisLend/blender:slider_overshoot_refactor into main 2023-05-05 17:22:46 +02:00
1 changed files with 5 additions and 2 deletions
Showing only changes of commit f13b43f068 - Show all commits

View File

@ -94,9 +94,12 @@ void ED_slider_status_string_get(const struct tSlider *slider,
float ED_slider_factor_get(struct tSlider *slider);
void ED_slider_factor_set(struct tSlider *slider, float factor);
/* One bool value for each side of the slider. Allows to allow overshoot only on one side. */
void ED_slider_allow_overshoot_set(struct tSlider *slider, bool left, bool right);
/* One bool value for each side of the slider. Allows to enable overshoot only on one side. */
void ED_slider_allow_overshoot_set(struct tSlider *slider, bool lower, bool upper);
/**

I think a comment here would be in order, something like:

/**
 * Set the bounds for the slider, which are applied until the user enables overshooting.
 */
void ED_slider_factor_bounds_set(struct tSlider *slider, float lower_bound, float upper_bound);

Just to make it clear what the relation between 'bounds' and 'overshoot' is.

I think a comment here would be in order, something like: ``` /** * Set the bounds for the slider, which are applied until the user enables overshooting. */ void ED_slider_factor_bounds_set(struct tSlider *slider, float lower_bound, float upper_bound); ``` Just to make it clear what the relation between 'bounds' and 'overshoot' is.
* Set the soft limits for the slider, which are applied until the user enables overshooting.
*/
void ED_slider_factor_bounds_set(struct tSlider *slider, float lower_bound, float upper_bound);
bool ED_slider_allow_increments_get(struct tSlider *slider);