MCPcopy Create free account
hub / github.com/RenderKit/embree / DebugLocateItemResolveWithLastItem

Method DebugLocateItemResolveWithLastItem

tutorials/common/imgui/imgui.cpp:13975–13987  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

13973}
13974
13975void ImGui::DebugLocateItemResolveWithLastItem()
13976{
13977 ImGuiContext& g = *GImGui;
13978 ImGuiLastItemData item_data = g.LastItemData;
13979 g.DebugLocateId = 0;
13980 ImDrawList* draw_list = GetForegroundDrawList(g.CurrentWindow);
13981 ImRect r = item_data.Rect;
13982 r.Expand(3.0f);
13983 ImVec2 p1 = g.IO.MousePos;
13984 ImVec2 p2 = ImVec2((p1.x < r.Min.x) ? r.Min.x : (p1.x > r.Max.x) ? r.Max.x : p1.x, (p1.y < r.Min.y) ? r.Min.y : (p1.y > r.Max.y) ? r.Max.y : p1.y);
13985 draw_list->AddRect(r.Min, r.Max, DEBUG_LOCATE_ITEM_COLOR);
13986 draw_list->AddLine(p1, p2, DEBUG_LOCATE_ITEM_COLOR);
13987}
13988
13989// [DEBUG] Item picker tool - start with DebugStartItemPicker() - useful to visually select an item and break into its call-stack.
13990void ImGui::UpdateDebugToolItemPicker()

Callers

nothing calls this directly

Calls 4

GetForegroundDrawListFunction · 0.85
ImVec2Function · 0.85
AddRectMethod · 0.80
AddLineMethod · 0.80

Tested by

no test coverage detected