f71cdd13b7 Internal tidying up, moved code to CalcNextScrollFromScrollTargetAndClamp() so it can be reused by upcoming nav code.
c816e6c742 Fixed SetScrollX() handling of center ratio (which actually wasn't exposed publicly). (#323, #246)
scroll.x=ImMin(scroll.x,ImMax(0.0f,window->SizeContents.x-(window->SizeFull.x-window->ScrollbarSizes.x)));// == GetScrollMaxX for that window
scroll.y=ImMin(scroll.y,ImMax(0.0f,window->SizeContents.y-(window->SizeFull.y-window->ScrollbarSizes.y)));// == GetScrollMaxY for that window
}
returnscroll;
}
// Push a new ImGui window to add widgets to.
// - A default window called "Debug" is automatically stacked at the beginning of every frame so you can use widgets without explicitly calling a Begin/End pair.
// - Begin/End can be called multiple times during the frame with the same window name to append content.