mirror of
https://github.com/Drezil/imgui.git
synced 2025-07-04 12:08:47 +02:00
Scrolling: Exposed SetNextWindowScroll() in public API. (#1526)
This commit is contained in:
@ -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);
|
||||
}
|
||||
|
Reference in New Issue
Block a user