Scrolling: Avoid SetScroll, SetScrollFromPos functions from snapping on the edge of scroll limits. (#3379) + Demo: Rename "Layout" to "Layout & Scrolling".

This commit is contained in:
omar
2020-08-05 17:09:40 +02:00
parent a24578ec09
commit 473a01adb0
4 changed files with 49 additions and 33 deletions

View File

@ -2490,11 +2490,9 @@ static void ShowDemoWindowLayout()
ImGui::Spacing();
HelpMarker(
"Use SetScrollHereX() or SetScrollFromPosX() to scroll to a given horizontal position.\n\n"
"Using the \"Scroll To Pos\" button above will make the discontinuity at edges visible: "
"scrolling to the top/bottom/left/right-most item will add an additional WindowPadding to reflect "
"on reaching the edge of the list.\n\nBecause the clipping rectangle of most window hides half "
"worth of WindowPadding on the left/right, using SetScrollFromPosX(+1) will usually result in "
"clipped text whereas the equivalent SetScrollFromPosY(+1) wouldn't.");
"Because the clipping rectangle of most window hides half worth of WindowPadding on the "
"left/right, using SetScrollFromPosX(+1) will usually result in clipped text whereas the "
"equivalent SetScrollFromPosY(+1) wouldn't.");
ImGui::PushID("##HorizontalScrolling");
for (int i = 0; i < 5; i++)
{