From 44d98bfd6d12caee43bea49fda71c8313c3e57e7 Mon Sep 17 00:00:00 2001 From: ocornut Date: Fri, 4 Nov 2022 16:35:57 +0100 Subject: [PATCH] Fix build with IMGUI_DISABLE_DEBUG_TOOLS --- imgui.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/imgui.cpp b/imgui.cpp index 2ecd365d6..9972fe026 100644 --- a/imgui.cpp +++ b/imgui.cpp @@ -6857,12 +6857,16 @@ bool ImGui::Begin(const char* name, bool* p_open, ImGuiWindowFlags flags) SetLastItemData(window->MoveId, g.CurrentItemFlags, IsMouseHoveringRect(title_bar_rect.Min, title_bar_rect.Max, false) ? ImGuiItemStatusFlags_HoveredRect : 0, title_bar_rect); // [DEBUG] +#ifndef IMGUI_DISABLE_DEBUG_TOOLS if (g.DebugLocateId != 0 && (window->ID == g.DebugLocateId || window->MoveId == g.DebugLocateId)) DebugLocateItemResolveWithLastItem(); +#endif // [Test Engine] Register title bar / tab +#ifdef IMGUI_ENABLE_TEST_ENGINE if (!(window->Flags & ImGuiWindowFlags_NoTitleBar)) IMGUI_TEST_ENGINE_ITEM_ADD(g.LastItemData.Rect, g.LastItemData.ID); +#endif } else { @@ -8697,8 +8701,10 @@ bool ImGui::ItemAdd(const ImRect& bb, ImGuiID id, const ImRect* nav_bb_arg, ImGu return false; // [DEBUG] +#ifndef IMGUI_DISABLE_DEBUG_TOOLS if (id != 0 && id == g.DebugLocateId) DebugLocateItemResolveWithLastItem(); +#endif //if (g.IO.KeyAlt) window->DrawList->AddRect(bb.Min, bb.Max, IM_COL32(255,255,0,120)); // [DEBUG] // We need to calculate this now to take account of the current clipping rectangle (as items like Selectable may change them)