| 469 | } |
| 470 | |
| 471 | MultiDragRes DragFloatValid3( const char * label, float* valueArr, float step, float valueMin, float valueMax, const char* format, ImGuiSliderFlags flags, const char* (*tooltips)[3] ) |
| 472 | { |
| 473 | MultiDragRes res; |
| 474 | |
| 475 | ImGuiContext& g = *ImGui::GetCurrentContext(); |
| 476 | ImGuiWindow* window = g.CurrentWindow; |
| 477 | if (window->SkipItems) |
| 478 | return res; |
| 479 | |
| 480 | BeginGroup(); |
| 481 | PushID(label); |
| 482 | constexpr int components = 3; |
| 483 | PushMultiItemsWidths(components, CalcItemWidth()); |
| 484 | for (int i = 0; i < components; i++) |
| 485 | { |
| 486 | PushID(i); |
| 487 | if (i > 0) |
| 488 | SameLine(0, g.Style.ItemInnerSpacing.x); |
| 489 | res.valueChanged = DragFloatValid("", valueArr + i, step, valueMin, valueMax, format, flags) || res.valueChanged; |
| 490 | if ( tooltips && IsItemHovered() && !IsItemActive() ) |
| 491 | SetTooltip( "%s", (*tooltips)[i] ); |
| 492 | res.itemDeactivatedAfterEdit = res.itemDeactivatedAfterEdit || IsItemDeactivatedAfterEdit(); |
| 493 | PopID(); |
| 494 | PopItemWidth(); |
| 495 | } |
| 496 | PopID(); |
| 497 | |
| 498 | const char* label_end = FindRenderedTextEnd(label); |
| 499 | if (label != label_end) |
| 500 | { |
| 501 | SameLine(0, g.Style.ItemInnerSpacing.x); |
| 502 | TextEx(label, label_end); |
| 503 | } |
| 504 | |
| 505 | EndGroup(); |
| 506 | return res; |
| 507 | } |
| 508 | |
| 509 | MultiDragRes DragIntValid3( const char* label, int v[3], float speed, int min, int max, const char* format, const char* ( *tooltips )[3]) |
| 510 | { |
nothing calls this directly
no test coverage detected