mirror of
https://github.com/xemu-project/imgui.git
synced 2024-11-30 13:40:35 +00:00
Examples: AutoResize demo doesn't use TextWrapped()
This commit is contained in:
parent
07ebb14ce2
commit
19f7bf90f8
@ -3261,7 +3261,7 @@ bool ImGui::Begin(const char* name, bool* p_opened, const ImVec2& size_on_first_
|
|||||||
|
|
||||||
ImRect title_bar_rect = window->TitleBarRect();
|
ImRect title_bar_rect = window->TitleBarRect();
|
||||||
|
|
||||||
// Apply and ImClamp scrolling
|
// Apply scrolling
|
||||||
window->ScrollY = window->NextScrollY;
|
window->ScrollY = window->NextScrollY;
|
||||||
window->ScrollY = ImMax(window->ScrollY, 0.0f);
|
window->ScrollY = ImMax(window->ScrollY, 0.0f);
|
||||||
if (!window->Collapsed && !window->SkipItems)
|
if (!window->Collapsed && !window->SkipItems)
|
||||||
@ -10771,7 +10771,7 @@ static void ShowExampleAppAutoResize(bool* opened)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static int lines = 10;
|
static int lines = 10;
|
||||||
ImGui::TextWrapped("Window will resize every-frame to the size of its content. Note that you don't want to query the window size to output your content because that would create a feedback loop.");
|
ImGui::Text("Window will resize every-frame to the size of its content.\nNote that you probably don't want to query the window size to\noutput your content because that would create a feedback loop.");
|
||||||
ImGui::SliderInt("Number of lines", &lines, 1, 20);
|
ImGui::SliderInt("Number of lines", &lines, 1, 20);
|
||||||
for (int i = 0; i < lines; i++)
|
for (int i = 0; i < lines; i++)
|
||||||
ImGui::Text("%*sThis is line %d", i*4, "", i); // Pad with space to extend size horizontally
|
ImGui::Text("%*sThis is line %d", i*4, "", i); // Pad with space to extend size horizontally
|
||||||
|
Loading…
Reference in New Issue
Block a user