| 12904 | } |
| 12905 | |
| 12906 | static void RenderViewportsThumbnails() |
| 12907 | { |
| 12908 | ImGuiContext& g = *GImGui; |
| 12909 | ImGuiWindow* window = g.CurrentWindow; |
| 12910 | |
| 12911 | // We don't display full monitor bounds (we could, but it often looks awkward), instead we display just enough to cover all of our viewports. |
| 12912 | float SCALE = 1.0f / 8.0f; |
| 12913 | ImRect bb_full(FLT_MAX, FLT_MAX, -FLT_MAX, -FLT_MAX); |
| 12914 | for (int n = 0; n < g.Viewports.Size; n++) |
| 12915 | bb_full.Add(g.Viewports[n]->GetMainRect()); |
| 12916 | ImVec2 p = window->DC.CursorPos; |
| 12917 | ImVec2 off = p - bb_full.Min * SCALE; |
| 12918 | for (int n = 0; n < g.Viewports.Size; n++) |
| 12919 | { |
| 12920 | ImGuiViewportP* viewport = g.Viewports[n]; |
| 12921 | ImRect viewport_draw_bb(off + (viewport->Pos) * SCALE, off + (viewport->Pos + viewport->Size) * SCALE); |
| 12922 | ImGui::DebugRenderViewportThumbnail(window->DrawList, viewport, viewport_draw_bb); |
| 12923 | } |
| 12924 | ImGui::Dummy(bb_full.GetSize() * SCALE); |
| 12925 | } |
| 12926 | |
| 12927 | // Helper tool to diagnose between text encoding issues and font loading issues. Pass your UTF-8 string and verify that there are correct. |
| 12928 | void ImGui::DebugTextEncoding(const char* str) |
no test coverage detected