// Our scheme may appears a bit unusual, basically we want the most-common calls AddLine AddRect etc. to not have to perform any check so we always have a command ready in the stack.
// Our scheme may appears a bit unusual, basically we want the most-common calls AddLine AddRect etc. to not have to perform any check so we always have a command ready in the stack.
// The cost of figuring out if a new command has to be added or if we can merge is paid in those Update** functions only.
// The cost of figuring out if a new command has to be added or if we can merge is paid in those Update** functions only.
if(window->SkipItems||!window->ClipRect.Overlaps(window->DC.LastItemRect))// FIXME: Because we don't have a ImGuiItemStatusFlags_Visible flag to test last ItemAdd() result
returnfalse;
IM_ASSERT(window->DC.LastItemRect.Min.x==preview_data->PreviewRect.Min.x&&window->DC.LastItemRect.Min.y==preview_data->PreviewRect.Min.y);// Didn't call after BeginCombo/EndCombo block or forgot to pass ImGuiComboFlags_CustomPreview flag?
if(!window->ClipRect.Contains(preview_data->PreviewRect))// Narrower test (optional)
returnfalse;
// FIXME: This could be contained in a PushWorkRect() api