mirror of
https://github.com/ocornut/imgui.git
synced 2026-01-11 00:04:24 +00:00
Scrolling: Exposed SetNextWindowScroll() in public API. (#1526)
This commit is contained in:
parent
cda26635cd
commit
7380b9816e
4 changed files with 10 additions and 2 deletions
|
|
@ -6721,6 +6721,8 @@ struct ExampleAppConsole
|
|||
if (copy_to_clipboard)
|
||||
ImGui::LogFinish();
|
||||
|
||||
// Keep up at the bottom of the scroll region if we were already at the bottom at the beginning of the frame.
|
||||
// Using a scrollbar or mouse-wheel will take away from the bottom edge.
|
||||
if (ScrollToBottom || (AutoScroll && ImGui::GetScrollY() >= ImGui::GetScrollMaxY()))
|
||||
ImGui::SetScrollHereY(1.0f);
|
||||
ScrollToBottom = false;
|
||||
|
|
@ -7029,6 +7031,8 @@ struct ExampleAppLog
|
|||
}
|
||||
ImGui::PopStyleVar();
|
||||
|
||||
// Keep up at the bottom of the scroll region if we were already at the bottom at the beginning of the frame.
|
||||
// Using a scrollbar or mouse-wheel will take away from the bottom edge.
|
||||
if (AutoScroll && ImGui::GetScrollY() >= ImGui::GetScrollMaxY())
|
||||
ImGui::SetScrollHereY(1.0f);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue