Draw Drag Scale with different p_min p_max.
546 {
547 using namespace ImGui;
548
549 ImGuiWindow* window = GetCurrentWindow();
550 if (window->SkipItems)
551 return false;
552
553 ImGuiContext& g = *GImGui;
554 bool value_changed = false;
555 BeginGroup();
556 PushID(label);
557 PushMultiItemsWidths(components, CalcItemWidth());
558 size_t type_size = GDataTypeInfo[data_type].Size;
559 for (int i = 0; i < components; i++)
560 {
561 PushID(i);
562 if (i > 0)
563 SameLine(0, g.Style.ItemInnerSpacing.x);
564 const void* cp_min = (float*)p_min + i;
565 const void* cp_mmx = (float*)p_max + i;
566 value_changed |= DragScalar("", data_type, p_data, v_speed, cp_min, cp_mmx, format, flags);
567 PopID();
568 PopItemWidth();
569 p_data = (void*)((char*)p_data + type_size);
570 }
571 PopID();
572
573 const char* label_end = FindRenderedTextEnd(label);
574 if (label != label_end)
575 {
576 SameLine(0, g.Style.ItemInnerSpacing.x);
577 TextEx(label, label_end);
578 }
579
580 EndGroup();
581 return value_changed;
582 }