| 3404 | } |
| 3405 | |
| 3406 | void ImGui::RenderNavHighlight(const ImRect& bb, ImGuiID id, ImGuiNavHighlightFlags flags) |
| 3407 | { |
| 3408 | ImGuiContext& g = *GImGui; |
| 3409 | if (id != g.NavId) |
| 3410 | return; |
| 3411 | if (g.NavDisableHighlight && !(flags & ImGuiNavHighlightFlags_AlwaysDraw)) |
| 3412 | return; |
| 3413 | ImGuiWindow* window = g.CurrentWindow; |
| 3414 | if (window->DC.NavHideHighlightOneFrame) |
| 3415 | return; |
| 3416 | |
| 3417 | float rounding = (flags & ImGuiNavHighlightFlags_NoRounding) ? 0.0f : g.Style.FrameRounding; |
| 3418 | ImRect display_rect = bb; |
| 3419 | display_rect.ClipWith(window->ClipRect); |
| 3420 | if (flags & ImGuiNavHighlightFlags_TypeDefault) |
| 3421 | { |
| 3422 | const float THICKNESS = 2.0f; |
| 3423 | const float DISTANCE = 3.0f + THICKNESS * 0.5f; |
| 3424 | display_rect.Expand(ImVec2(DISTANCE, DISTANCE)); |
| 3425 | bool fully_visible = window->ClipRect.Contains(display_rect); |
| 3426 | if (!fully_visible) |
| 3427 | window->DrawList->PushClipRect(display_rect.Min, display_rect.Max); |
| 3428 | window->DrawList->AddRect(display_rect.Min + ImVec2(THICKNESS * 0.5f, THICKNESS * 0.5f), display_rect.Max - ImVec2(THICKNESS * 0.5f, THICKNESS * 0.5f), GetColorU32(ImGuiCol_NavHighlight), rounding, 0, THICKNESS); |
| 3429 | if (!fully_visible) |
| 3430 | window->DrawList->PopClipRect(); |
| 3431 | } |
| 3432 | if (flags & ImGuiNavHighlightFlags_TypeThin) |
| 3433 | { |
| 3434 | window->DrawList->AddRect(display_rect.Min, display_rect.Max, GetColorU32(ImGuiCol_NavHighlight), rounding, 0, 1.0f); |
| 3435 | } |
| 3436 | } |
| 3437 | |
| 3438 | void ImGui::RenderMouseCursor(ImVec2 base_pos, float base_scale, ImGuiMouseCursor mouse_cursor, ImU32 col_fill, ImU32 col_border, ImU32 col_shadow) |
| 3439 | { |
nothing calls this directly
no test coverage detected