vendor/imgui/imgui_rangeslider.cpp
bool ImGui::RangeSliderScalarN(const char* label, ImGuiDataType data_type, void* v1, void* v2, int components, const void* v_min, const void* v_max, const char* format, float power)
    {
        ImGuiWindow* window = GetCurrentWindow();
        if (window->SkipItems)
            return false;

        ImGuiContext& g = *GImGui;
        bool value_changed = false;
        BeginGroup();
        PushID(label);
        PushMultiItemsWidths(components, CalcItemWidth());
        size_t type_size = GDataTypeInfo[data_type].Size;
        for (int i = 0; i < components; i++)
        {
            PushID(i);
            if (i > 0)
                SameLine(0, g.Style.ItemInnerSpacing.x);
            value_changed |= RangeSliderScalar("", data_type, v1, v2, v_min, v_max, format, power);
            PopID();
            PopItemWidth();
            v1 = (void*)((char*)v1 + type_size);
            v2 = (void*)((char*)v2 + type_size);
        }
        PopID();

        const char* label_end = FindRenderedTextEnd(label);
        if (label != label_end)
        {
            SameLine(0, g.Style.ItemInnerSpacing.x);
            TextEx(label, label_end);
        }

        EndGroup();
        return value_changed;
    }
// ~95% common code with ImGui::SliderScalarN
// Add multiple sliders on 1 line for compact edition of multiple components
~95% common code with ImGui::SliderScalarN
Add multiple sliders on 1 line for compact edition of multiple components
~95% common code with ImGui :: SliderScalarN Add multiple sliders on 1 line for compact edition of multiple components
bool ImGui::RangeSliderScalarN(const char* label, ImGuiDataType data_type, void* v1, void* v2, int components, const void* v_min, const void* v_max, const char* format, float power)
    {
        ImGuiWindow* window = GetCurrentWindow();
        if (window->SkipItems)
            return false;
        ImGuiContext& g = *GImGui;
        bool value_changed = false;
        BeginGroup();
        PushID(label);
        PushMultiItemsWidths(components, CalcItemWidth());
        size_t type_size = GDataTypeInfo[data_type].Size;
        for (int i = 0; i < components; i++)
        {
            PushID(i);
            if (i > 0)
                SameLine(0, g.Style.ItemInnerSpacing.x);
            value_changed |= RangeSliderScalar("", data_type, v1, v2, v_min, v_max, format, power);
            PopID();
            PopItemWidth();
            v1 = (void*)((char*)v1 + type_size);
            v2 = (void*)((char*)v2 + type_size);
        }
        PopID();
        const char* label_end = FindRenderedTextEnd(label);
        if (label != label_end)
        {
            SameLine(0, g.Style.ItemInnerSpacing.x);
            TextEx(label, label_end);
        }
        EndGroup();
        return value_changed;
    }
bool ImGui :: RangeSliderScalarN ( const char * label , ImGuiDataType data_type , void * v1 , void * v2 , int components , const void * v_min , const void * v_max , const char * format , float power ) { ImGuiWindow * window = GetCurrentWindow ( ) ; if ( window -> SkipItems ) return false ; ImGuiContext & g = * GImGui ; bool value_changed = false ; BeginGroup ( ) ; PushID ( label ) ; PushMultiItemsWidths ( components , CalcItemWidth ( ) ) ; size_t type_size = GDataTypeInfo [ data_type ] . Size ; for ( int i = 0 ; i < components ; i ++ ) { PushID ( i ) ; if ( i > 0 ) SameLine ( 0 , g . Style . ItemInnerSpacing . x ) ; value_changed |= RangeSliderScalar ( " " , data_type , v1 , v2 , v_min , v_max , format , power ) ; PopID ( ) ; PopItemWidth ( ) ; v1 = ( void * ) ( ( char * ) v1 + type_size ) ; v2 = ( void * ) ( ( char * ) v2 + type_size ) ; } PopID ( ) ; const char * label_end = FindRenderedTextEnd ( label ) ; if ( label != label_end ) { SameLine ( 0 , g . Style . ItemInnerSpacing . x ) ; TextEx ( label , label_end ) ; } EndGroup ( ) ; return value_changed ; }
~95% common code with ImGui::SliderScalarN
Add multiple sliders on 1 line for compact edition of multiple components
~95% common code with ImGui :: SliderScalarN Add multiple sliders on 1 line for compact edition of multiple components