MCPcopy Create free account
hub / github.com/cinder/Cinder / RenderDragDropTargetRect

Method RenderDragDropTargetRect

src/imgui/imgui.cpp:14799–14812  ·  view source on GitHub ↗

FIXME-STYLE FIXME-DRAGDROP: Settle on a proper default visuals for drop target.

Source from the content-addressed store, hash-verified

14797
14798// FIXME-STYLE FIXME-DRAGDROP: Settle on a proper default visuals for drop target.
14799void ImGui::RenderDragDropTargetRect(const ImRect& bb, const ImRect& item_clip_rect)
14800{
14801 ImGuiContext& g = *GImGui;
14802 ImGuiWindow* window = g.CurrentWindow;
14803 ImRect bb_display = bb;
14804 bb_display.ClipWith(item_clip_rect); // Clip THEN expand so we have a way to visualize that target is not entirely visible.
14805 bb_display.Expand(3.5f);
14806 bool push_clip_rect = !window->ClipRect.Contains(bb_display);
14807 if (push_clip_rect)
14808 window->DrawList->PushClipRectFullScreen();
14809 window->DrawList->AddRect(bb_display.Min, bb_display.Max, GetColorU32(ImGuiCol_DragDropTarget), 0.0f, 0, 2.0f); // FIXME-DPI
14810 if (push_clip_rect)
14811 window->DrawList->PopClipRect();
14812}
14813
14814const ImGuiPayload* ImGui::GetDragDropPayload()
14815{

Callers

nothing calls this directly

Calls 4

AddRectMethod · 0.80
ContainsMethod · 0.45
PopClipRectMethod · 0.45

Tested by

no test coverage detected