|
|
@@ -10,6 +10,8 @@ IMGUI_API float RoundScalarWithFormatT<float, float>(const char* format, ImGuiDa
|
|
|
extern template
|
|
|
IMGUI_API float SliderCalcRatioFromValueT<float, float>(ImGuiDataType data_type, float v, float v_min, float v_max, float power, float linear_zero_pos);
|
|
|
|
|
|
+extern float SliderCalcRatioFromValueFloat(ImGuiDataType data_type, float v, float v_min, float v_max, float power, float linear_zero_pos);
|
|
|
+
|
|
|
// ~80% common code with ImGui::SliderBehavior
|
|
|
bool RangeSliderBehavior(const ImRect& frame_bb, ImGuiID id, float* v1, float* v2, float v_min, float v_max, float power, int decimal_precision, ImGuiSliderFlags flags)
|
|
|
{
|
|
|
@@ -114,7 +116,7 @@ bool RangeSliderBehavior(const ImRect& frame_bb, ImGuiID id, float* v1, float* v
|
|
|
}
|
|
|
|
|
|
// Calculate slider grab positioning
|
|
|
- float grab_t = SliderCalcRatioFromValueT<float, float>(ImGuiDataType_Float, *v1, v_min, v_max, power, linear_zero_pos);
|
|
|
+ float grab_t = SliderCalcRatioFromValueFloat(ImGuiDataType_Float, *v1, v_min, v_max, power, linear_zero_pos);
|
|
|
|
|
|
// Draw
|
|
|
if (!is_horizontal)
|
|
|
@@ -128,7 +130,7 @@ bool RangeSliderBehavior(const ImRect& frame_bb, ImGuiID id, float* v1, float* v
|
|
|
window->DrawList->AddRectFilled(grab_bb1.Min, grab_bb1.Max, GetColorU32(g.ActiveId == id ? ImGuiCol_SliderGrabActive : ImGuiCol_SliderGrab), style.GrabRounding);
|
|
|
|
|
|
// Calculate slider grab positioning
|
|
|
- grab_t = SliderCalcRatioFromValueT<float, float>(ImGuiDataType_Float, *v2, v_min, v_max, power, linear_zero_pos);
|
|
|
+ grab_t = SliderCalcRatioFromValueFloat(ImGuiDataType_Float, *v2, v_min, v_max, power, linear_zero_pos);
|
|
|
|
|
|
// Draw
|
|
|
if (!is_horizontal)
|