| 387 | } |
| 388 | |
| 389 | bool DragFloatValidLineWidth( const char* label, float* value ) |
| 390 | { |
| 391 | const auto& range = MR::GetAvailableLineWidthRange(); |
| 392 | bool cannotChange = range.x == range.y; |
| 393 | if ( cannotChange ) |
| 394 | ImGui::PushStyleColor( ImGuiCol_Text, MR::Color::gray().getUInt32() ); |
| 395 | bool res = DragFloatValid( label, value, 1.0f, range.x, range.y, "%.1f", |
| 396 | cannotChange ? ImGuiSliderFlags_NoInput : ImGuiSliderFlags_None ); |
| 397 | if ( cannotChange ) |
| 398 | { |
| 399 | ImGui::PopStyleColor(); |
| 400 | if ( IsItemHovered() && !IsItemActive() ) |
| 401 | SetTooltip( "%s", _tr( "Line width cannot be changed with current renderer." ) ); |
| 402 | } |
| 403 | return res; |
| 404 | } |
| 405 | |
| 406 | bool DragIntValid( const char *label, int* v, float speed, |
| 407 | int v_min, int v_max, const char* format ) |
nothing calls this directly
no test coverage detected