1
0
Fork 0
mirror of https://github.com/ocornut/imgui.git synced 2026-01-11 00:04:24 +00:00

Internals: rename DebugDrawIdConflicts -> DebugDrawIdConflictsId.

This commit is contained in:
ocornut 2025-07-09 18:24:14 +02:00
parent d9b758661f
commit f39b138487
2 changed files with 7 additions and 7 deletions

View file

@ -4032,7 +4032,7 @@ ImGuiContext::ImGuiContext(ImFontAtlas* shared_font_atlas)
WheelingWindowStartFrame = WheelingWindowScrolledFrame = -1; WheelingWindowStartFrame = WheelingWindowScrolledFrame = -1;
WheelingWindowReleaseTimer = 0.0f; WheelingWindowReleaseTimer = 0.0f;
DebugDrawIdConflicts = 0; DebugDrawIdConflictsId = 0;
DebugHookIdInfo = 0; DebugHookIdInfo = 0;
HoveredId = HoveredIdPreviousFrame = 0; HoveredId = HoveredIdPreviousFrame = 0;
HoveredIdPreviousFrameItemCount = 0; HoveredIdPreviousFrameItemCount = 0;
@ -4748,7 +4748,7 @@ bool ImGui::ItemHoverable(const ImRect& bb, ImGuiID id, ImGuiItemFlags item_flag
if (id != 0 && g.HoveredIdPreviousFrame == id && (item_flags & ImGuiItemFlags_AllowDuplicateId) == 0) if (id != 0 && g.HoveredIdPreviousFrame == id && (item_flags & ImGuiItemFlags_AllowDuplicateId) == 0)
{ {
g.HoveredIdPreviousFrameItemCount++; g.HoveredIdPreviousFrameItemCount++;
if (g.DebugDrawIdConflicts == id) if (g.DebugDrawIdConflictsId == id)
window->DrawList->AddRect(bb.Min - ImVec2(1,1), bb.Max + ImVec2(1,1), IM_COL32(255, 0, 0, 255), 0.0f, ImDrawFlags_None, 2.0f); window->DrawList->AddRect(bb.Min - ImVec2(1,1), bb.Max + ImVec2(1,1), IM_COL32(255, 0, 0, 255), 0.0f, ImDrawFlags_None, 2.0f);
} }
#endif #endif
@ -5376,9 +5376,9 @@ void ImGui::NewFrame()
// [DEBUG] // [DEBUG]
if (!g.IO.ConfigDebugHighlightIdConflicts || !g.IO.KeyCtrl) // Count is locked while holding CTRL if (!g.IO.ConfigDebugHighlightIdConflicts || !g.IO.KeyCtrl) // Count is locked while holding CTRL
g.DebugDrawIdConflicts = 0; g.DebugDrawIdConflictsId = 0;
if (g.IO.ConfigDebugHighlightIdConflicts && g.HoveredIdPreviousFrameItemCount > 1) if (g.IO.ConfigDebugHighlightIdConflicts && g.HoveredIdPreviousFrameItemCount > 1)
g.DebugDrawIdConflicts = g.HoveredIdPreviousFrame; g.DebugDrawIdConflictsId = g.HoveredIdPreviousFrame;
// Update HoveredId data // Update HoveredId data
if (!g.HoveredIdPreviousFrame) if (!g.HoveredIdPreviousFrame)
@ -10841,9 +10841,9 @@ void ImGui::ErrorCheckEndFrameFinalizeErrorTooltip()
{ {
#ifndef IMGUI_DISABLE_DEBUG_TOOLS #ifndef IMGUI_DISABLE_DEBUG_TOOLS
ImGuiContext& g = *GImGui; ImGuiContext& g = *GImGui;
if (g.DebugDrawIdConflicts != 0 && g.IO.KeyCtrl == false) if (g.DebugDrawIdConflictsId != 0 && g.IO.KeyCtrl == false)
g.DebugDrawIdConflictsCount = g.HoveredIdPreviousFrameItemCount; g.DebugDrawIdConflictsCount = g.HoveredIdPreviousFrameItemCount;
if (g.DebugDrawIdConflicts != 0 && g.DebugItemPickerActive == false && BeginErrorTooltip()) if (g.DebugDrawIdConflictsId != 0 && g.DebugItemPickerActive == false && BeginErrorTooltip())
{ {
Text("Programmer error: %d visible items with conflicting ID!", g.DebugDrawIdConflictsCount); Text("Programmer error: %d visible items with conflicting ID!", g.DebugDrawIdConflictsCount);
BulletText("Code should use PushID()/PopID() in loops, or append \"##xx\" to same-label identifiers!"); BulletText("Code should use PushID()/PopID() in loops, or append \"##xx\" to same-label identifiers!");

View file

@ -2192,7 +2192,7 @@ struct ImGuiContext
ImVec2 WheelingAxisAvg; ImVec2 WheelingAxisAvg;
// Item/widgets state and tracking information // Item/widgets state and tracking information
ImGuiID DebugDrawIdConflicts; // Set when we detect multiple items with the same identifier ImGuiID DebugDrawIdConflictsId; // Set when we detect multiple items with the same identifier
ImGuiID DebugHookIdInfo; // Will call core hooks: DebugHookIdInfo() from GetID functions, used by ID Stack Tool [next HoveredId/ActiveId to not pull in an extra cache-line] ImGuiID DebugHookIdInfo; // Will call core hooks: DebugHookIdInfo() from GetID functions, used by ID Stack Tool [next HoveredId/ActiveId to not pull in an extra cache-line]
ImGuiID HoveredId; // Hovered widget, filled during the frame ImGuiID HoveredId; // Hovered widget, filled during the frame
ImGuiID HoveredIdPreviousFrame; ImGuiID HoveredIdPreviousFrame;