From 88a24fb89643b7ee6bd315c996e99ddd0ddf0675 Mon Sep 17 00:00:00 2001 From: ocornut Date: Mon, 24 May 2021 15:42:26 +0200 Subject: [PATCH] Fix build with IMGUI_DISABLE_DEMO_WINDOWS --- imgui.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/imgui.cpp b/imgui.cpp index d9773242..0ea284a2 100644 --- a/imgui.cpp +++ b/imgui.cpp @@ -10910,7 +10910,9 @@ static void MetricsHelpMarker(const char* desc) } } +#ifndef IMGUI_DISABLE_DEMO_WINDOWS namespace ImGui { void ShowFontAtlas(ImFontAtlas* atlas); } +#endif void ImGui::ShowMetricsWindow(bool* p_open) { @@ -11115,12 +11117,14 @@ void ImGui::ShowMetricsWindow(bool* p_open) } // Details for Fonts +#ifndef IMGUI_DISABLE_DEMO_WINDOWS ImFontAtlas* atlas = g.IO.Fonts; if (TreeNode("Fonts", "Fonts (%d)", atlas->Fonts.Size)) { ShowFontAtlas(atlas); TreePop(); } +#endif // Details for Docking #ifdef IMGUI_HAS_DOCK