Fix build with IMGUI_DISABLE_DEBUG_TOOLS
This commit is contained in:
parent
529cba19b0
commit
44d98bfd6d
@ -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);
|
SetLastItemData(window->MoveId, g.CurrentItemFlags, IsMouseHoveringRect(title_bar_rect.Min, title_bar_rect.Max, false) ? ImGuiItemStatusFlags_HoveredRect : 0, title_bar_rect);
|
||||||
|
|
||||||
// [DEBUG]
|
// [DEBUG]
|
||||||
|
#ifndef IMGUI_DISABLE_DEBUG_TOOLS
|
||||||
if (g.DebugLocateId != 0 && (window->ID == g.DebugLocateId || window->MoveId == g.DebugLocateId))
|
if (g.DebugLocateId != 0 && (window->ID == g.DebugLocateId || window->MoveId == g.DebugLocateId))
|
||||||
DebugLocateItemResolveWithLastItem();
|
DebugLocateItemResolveWithLastItem();
|
||||||
|
#endif
|
||||||
|
|
||||||
// [Test Engine] Register title bar / tab
|
// [Test Engine] Register title bar / tab
|
||||||
|
#ifdef IMGUI_ENABLE_TEST_ENGINE
|
||||||
if (!(window->Flags & ImGuiWindowFlags_NoTitleBar))
|
if (!(window->Flags & ImGuiWindowFlags_NoTitleBar))
|
||||||
IMGUI_TEST_ENGINE_ITEM_ADD(g.LastItemData.Rect, g.LastItemData.ID);
|
IMGUI_TEST_ENGINE_ITEM_ADD(g.LastItemData.Rect, g.LastItemData.ID);
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -8697,8 +8701,10 @@ bool ImGui::ItemAdd(const ImRect& bb, ImGuiID id, const ImRect* nav_bb_arg, ImGu
|
|||||||
return false;
|
return false;
|
||||||
|
|
||||||
// [DEBUG]
|
// [DEBUG]
|
||||||
|
#ifndef IMGUI_DISABLE_DEBUG_TOOLS
|
||||||
if (id != 0 && id == g.DebugLocateId)
|
if (id != 0 && id == g.DebugLocateId)
|
||||||
DebugLocateItemResolveWithLastItem();
|
DebugLocateItemResolveWithLastItem();
|
||||||
|
#endif
|
||||||
//if (g.IO.KeyAlt) window->DrawList->AddRect(bb.Min, bb.Max, IM_COL32(255,255,0,120)); // [DEBUG]
|
//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)
|
// We need to calculate this now to take account of the current clipping rectangle (as items like Selectable may change them)
|
||||||
|
Loading…
Reference in New Issue
Block a user