mirror of
https://github.com/ocornut/imgui.git
synced 2026-05-31 06:15:45 +08:00
Debug Tools: ID Stack Tool: when ### is used, uncontributing prefix before the ### is now skipped. (#8904, #4631)
This commit is contained in:
@@ -50,6 +50,8 @@ Other Changes:
|
|||||||
pointer, which could to issue when deleting the cloned list. (#8894, #1860)
|
pointer, which could to issue when deleting the cloned list. (#8894, #1860)
|
||||||
- Debug Tools: ID Stack Tool: fixed using fixed-size buffers preventing long identifiers
|
- Debug Tools: ID Stack Tool: fixed using fixed-size buffers preventing long identifiers
|
||||||
from being displayed in the tool. (#8905, #4631)
|
from being displayed in the tool. (#8905, #4631)
|
||||||
|
- Debug Tools: ID Stack Tool: when ### is used, uncontributing prefix before the ###
|
||||||
|
is now skipped. (#8904, #4631)
|
||||||
- Debug Tools: ID Stack Tool: added option to hex-encode non-ASCII characters in
|
- Debug Tools: ID Stack Tool: added option to hex-encode non-ASCII characters in
|
||||||
output path. (#8904, #4631)
|
output path. (#8904, #4631)
|
||||||
- Examples: Android: Android+OpenGL3: update Gradle project (#8888, #8878) [@scribam]
|
- Examples: Android: Android+OpenGL3: update Gradle project (#8888, #8878) [@scribam]
|
||||||
|
|||||||
@@ -17733,14 +17733,14 @@ static int StackToolFormatLevelInfo(ImGuiIDStackTool* tool, int n, bool format_f
|
|||||||
ImGuiStackLevelInfo* info = &tool->Results[n];
|
ImGuiStackLevelInfo* info = &tool->Results[n];
|
||||||
ImGuiWindow* window = (info->DescOffset == -1 && n == 0) ? ImGui::FindWindowByID(info->ID) : NULL;
|
ImGuiWindow* window = (info->DescOffset == -1 && n == 0) ? ImGui::FindWindowByID(info->ID) : NULL;
|
||||||
if (window) // Source: window name (because the root ID don't call GetID() and so doesn't get hooked)
|
if (window) // Source: window name (because the root ID don't call GetID() and so doesn't get hooked)
|
||||||
return ImFormatString(buf, buf_size, format_for_ui ? "\"%s\" [window]" : "%s", window->Name);
|
return ImFormatString(buf, buf_size, format_for_ui ? "\"%s\" [window]" : "%s", ImHashSkipUncontributingPrefix(window->Name));
|
||||||
if (info->QuerySuccess) // Source: GetID() hooks (prioritize over ItemInfo() because we frequently use patterns like: PushID(str), Button("") where they both have same id)
|
if (info->QuerySuccess) // Source: GetID() hooks (prioritize over ItemInfo() because we frequently use patterns like: PushID(str), Button("") where they both have same id)
|
||||||
return ImFormatString(buf, buf_size, (format_for_ui && info->DataType == ImGuiDataType_String) ? "\"%s\"" : "%s", &tool->ResultPathsBuf.Buf[info->DescOffset]);
|
return ImFormatString(buf, buf_size, (format_for_ui && info->DataType == ImGuiDataType_String) ? "\"%s\"" : "%s", ImHashSkipUncontributingPrefix(&tool->ResultPathsBuf.Buf[info->DescOffset]));
|
||||||
if (tool->StackLevel < tool->Results.Size) // Only start using fallback below when all queries are done, so during queries we don't flickering ??? markers.
|
if (tool->StackLevel < tool->Results.Size) // Only start using fallback below when all queries are done, so during queries we don't flickering ??? markers.
|
||||||
return (*buf = 0);
|
return (*buf = 0);
|
||||||
#ifdef IMGUI_ENABLE_TEST_ENGINE
|
#ifdef IMGUI_ENABLE_TEST_ENGINE
|
||||||
if (const char* label = ImGuiTestEngine_FindItemDebugLabel(GImGui, info->ID)) // Source: ImGuiTestEngine's ItemInfo()
|
if (const char* label = ImGuiTestEngine_FindItemDebugLabel(GImGui, info->ID)) // Source: ImGuiTestEngine's ItemInfo()
|
||||||
return ImFormatString(buf, buf_size, format_for_ui ? "??? \"%s\"" : "%s", label);
|
return ImFormatString(buf, buf_size, format_for_ui ? "??? \"%s\"" : "%s", ImHashSkipUncontributingPrefix(label));
|
||||||
#endif
|
#endif
|
||||||
return ImFormatString(buf, buf_size, "???");
|
return ImFormatString(buf, buf_size, "???");
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user