| 431 | } |
| 432 | |
| 433 | MultiDragRes DragFloatValid2( const char* label, float* valueArr, float step, float valueMin, float valueMax, const char* format, ImGuiSliderFlags flags, const char* ( *tooltips )[2] ) |
| 434 | { |
| 435 | MultiDragRes res; |
| 436 | |
| 437 | ImGuiContext& g = *ImGui::GetCurrentContext(); |
| 438 | ImGuiWindow* window = g.CurrentWindow; |
| 439 | if ( window->SkipItems ) |
| 440 | return res; |
| 441 | |
| 442 | BeginGroup(); |
| 443 | PushID( label ); |
| 444 | constexpr int components = 2; |
| 445 | PushMultiItemsWidths( components, CalcItemWidth() ); |
| 446 | for ( int i = 0; i < components; i++ ) |
| 447 | { |
| 448 | PushID( i ); |
| 449 | if ( i > 0 ) |
| 450 | SameLine( 0, g.Style.ItemInnerSpacing.x ); |
| 451 | res.valueChanged = DragFloatValid( "", valueArr + i, step, valueMin, valueMax, format, flags ) || res.valueChanged; |
| 452 | if ( tooltips && IsItemHovered() && !IsItemActive() ) |
| 453 | SetTooltip( "%s", ( *tooltips )[i] ); |
| 454 | res.itemDeactivatedAfterEdit = res.itemDeactivatedAfterEdit || IsItemDeactivatedAfterEdit(); |
| 455 | PopID(); |
| 456 | PopItemWidth(); |
| 457 | } |
| 458 | PopID(); |
| 459 | |
| 460 | const char* label_end = FindRenderedTextEnd( label ); |
| 461 | if ( label != label_end ) |
| 462 | { |
| 463 | SameLine( 0, g.Style.ItemInnerSpacing.x ); |
| 464 | TextEx( label, label_end ); |
| 465 | } |
| 466 | |
| 467 | EndGroup(); |
| 468 | return res; |
| 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 | { |
nothing calls this directly
no test coverage detected