[DEBUG] List fonts in a font atlas and display its texture
| 18576 | |
| 18577 | // [DEBUG] List fonts in a font atlas and display its texture |
| 18578 | void ImGui::ShowFontAtlas(ImFontAtlas* atlas) |
| 18579 | { |
| 18580 | for (int i = 0; i < atlas->Fonts.Size; i++) |
| 18581 | { |
| 18582 | ImFont* font = atlas->Fonts[i]; |
| 18583 | PushID(font); |
| 18584 | DebugNodeFont(font); |
| 18585 | PopID(); |
| 18586 | } |
| 18587 | if (TreeNode("Atlas texture", "Atlas texture (%dx%d pixels)", atlas->TexWidth, atlas->TexHeight)) |
| 18588 | { |
| 18589 | ImVec4 tint_col = ImVec4(1.0f, 1.0f, 1.0f, 1.0f); |
| 18590 | ImVec4 border_col = ImVec4(1.0f, 1.0f, 1.0f, 0.5f); |
| 18591 | Image(atlas->TexID, ImVec2((float)atlas->TexWidth, (float)atlas->TexHeight), ImVec2(0.0f, 0.0f), ImVec2(1.0f, 1.0f), tint_col, border_col); |
| 18592 | TreePop(); |
| 18593 | } |
| 18594 | } |
| 18595 | |
| 18596 | void ImGui::ShowMetricsWindow(bool* p_open) |
| 18597 | { |