Fix OuterRectClipped not being clipped correctly, which resulted in child window outside visible bound to not be marked with SkipItems. Broken in b50c61c961.

+ Comments on InnerClipRect being misleading. Demo: Tweak to sizing of child window in the Layout->Scrolling section.
This commit is contained in:
omar
2019-05-22 21:43:42 +02:00
parent 34b881eb12
commit a2eec8f5b5
3 changed files with 21 additions and 13 deletions

View File

@ -1290,8 +1290,9 @@ struct IMGUI_API ImGuiWindow
ImGuiWindowTempData DC; // Temporary per-window data, reset at the beginning of the frame. This used to be called ImGuiDrawContext, hence the "DC" variable name.
ImVector<ImGuiID> IDStack; // ID stack. ID are hashes seeded with the value at the top of the stack
ImRect ClipRect; // Current clipping rectangle. = DrawList->clip_rect_stack.back(). Scissoring / clipping rectangle. x1, y1, x2, y2.
ImRect OuterRectClipped; // = WindowRect just after setup in Begin(). == window->Rect() for root window.
ImRect InnerMainRect, InnerClipRect;
ImRect OuterRectClipped; // == WindowRect just after setup in Begin(). == window->Rect() for root window.
ImRect InnerMainRect; //
ImRect InnerClipRect; // == InnerMainRect, minus WindowPadding on each side, clipped within viewport or parent.
ImRect ContentsRegionRect; // FIXME: This is currently confusing/misleading. Maximum visible content position ~~ Pos + (SizeContentsExplicit ? SizeContentsExplicit : Size - ScrollbarSizes) - CursorStartPos, per axis
int LastFrameActive; // Last frame number the window was Active.
float ItemWidthDefault;