浏览代码

Fix build with IMGUI_DISABLE_DEMO_WINDOWS

ocornut 4 年之前
父节点
当前提交
88a24fb896
共有 1 个文件被更改,包括 4 次插入0 次删除
  1. 4 0
      imgui.cpp

+ 4 - 0
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