Fixed GetWindowContentRegionMax() being off by ScrollSize amount when SizeExplicit is set + caching ContentsRegionRect.

Relates to horizontal scrollbar, explicit contents size
This commit is contained in:
ocornut
2016-05-29 17:50:23 +02:00
parent d5a12866fe
commit 45dacbf084
2 changed files with 12 additions and 8 deletions

View File

@ -607,6 +607,7 @@ struct IMGUI_API ImGuiWindow
ImVec2 SizeFull; // Size when non collapsed
ImVec2 SizeContents; // Size of contents (== extents reach of the drawing cursor) from previous frame
ImVec2 SizeContentsExplicit; // Size of contents explicitly set by the user via SetNextWindowContentSize()
ImRect ContentsRegionRect; // Maximum visible content position in window coordinates. ~~ (SizeContentsExplicit ? SizeContentsExplicit : Size - ScrollbarSizes) - CursorStartPos, per axis
ImVec2 WindowPadding; // Window padding at the time of begin. We need to lock it, in particular manipulation of the ShowBorder would have an effect
ImGuiID MoveID; // == window->GetID("#MOVE")
ImVec2 Scroll;