瀏覽代碼

Separator() logs itself as text

ocornut 10 年之前
父節點
當前提交
55093ea8fe
共有 1 個文件被更改,包括 4 次插入0 次删除
  1. 4 0
      imgui.cpp

+ 4 - 0
imgui.cpp

@@ -6487,6 +6487,10 @@ void ImGui::Separator()
 
     window->DrawList->AddLine(bb.Min, bb.Max, window->Color(ImGuiCol_Border));
 
+    ImGuiState& g = *GImGui;
+    if (g.LogEnabled)
+        ImGui::LogText(STR_NEWLINE "--------------------------------");
+
     if (window->DC.ColumnsCount > 1)
     {
         PushColumnClipRect();