in the function : ImGui::SliderBehaviorT
i can replace
v_new = ImLerp(v_min, v_max, clicked_t);
FLOATTYPE v_new_off_f = (v_max - v_min) * clicked_t;
FLOATTYPE v_new_off_floor = (int)(v_new_off_f / step) * step;
FLOATTYPE v_new_off_round = v_new_off_floor + step;
if (!is_decimal && v_new_off_floor < v_new_off_round)
v_new = v_min + v_new_off_round;
v_new = v_min + v_new_off_floor;
if (is_decimal) test. and the var step is the
i would like to activate this stepped func, by maybe adding a step parameter. if this parameter is equal to zero, so we use the classical Imlerp, and if > 0.0f we use this one.
but i dont know if i need to rewrite all sliders for use my SliderBehaviorT ?
if you are interest i can propose a PL for all decimal slider and drag.
it can be nice also to have the possibility to step the SliderInt,by ex, if we have a range of 100, it can be nice to step by 10, 15, 20 or 25 if needed.
i thinkc it can be a useful feauture, with not big code modification
maybe we can simplify for use same code for float and int stepper also
if perf are same
a demo :