From 9e6ed0991df75964f96ba64fbd79a50b61b74bae Mon Sep 17 00:00:00 2001 From: ocornut Date: Sun, 15 May 2016 16:03:15 +0200 Subject: [PATCH] Demo: clarified misleading example (#660) --- imgui_demo.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/imgui_demo.cpp b/imgui_demo.cpp index 3961b220c..c252324f2 100644 --- a/imgui_demo.cpp +++ b/imgui_demo.cpp @@ -2440,7 +2440,7 @@ static void ShowExampleAppLongText(bool* p_open) { // Multiple calls to Text(), manually coarsely clipped - demonstrate how to use the ImGuiListClipper helper. ImGui::PushStyleVar(ImGuiStyleVar_ItemSpacing, ImVec2(0,0)); - ImGuiListClipper clipper(lines, ImGui::GetTextLineHeight()); + ImGuiListClipper clipper(lines, ImGui::GetTextLineHeightWithSpacing()); // Here we changed spacing is zero anyway so we could use GetTextLineHeight(), but _WithSpacing() is typically more correct for (int i = clipper.DisplayStart; i < clipper.DisplayEnd; i++) ImGui::Text("%i The quick brown fox jumps over the lazy dog\n", i); clipper.End();