mirror of
https://github.com/ocornut/imgui.git
synced 2025-12-21 05:45:34 +00:00
Debug Tools: ID Stack Tool: store ResultsComplete and don't display incomplete paths.
This commit is contained in:
@@ -17819,9 +17819,10 @@ void ImGui::UpdateDebugToolStackQueries()
|
|||||||
if (stack_level >= 0 && stack_level < tool->Results.Size)
|
if (stack_level >= 0 && stack_level < tool->Results.Size)
|
||||||
if (tool->Results[stack_level].QuerySuccess || tool->Results[stack_level].QueryFrameCount > 2)
|
if (tool->Results[stack_level].QuerySuccess || tool->Results[stack_level].QueryFrameCount > 2)
|
||||||
tool->StackLevel++;
|
tool->StackLevel++;
|
||||||
|
|
||||||
// Update hook
|
|
||||||
stack_level = tool->StackLevel;
|
stack_level = tool->StackLevel;
|
||||||
|
|
||||||
|
// Update status and hook
|
||||||
|
tool->ResultsComplete = (stack_level == tool->Results.Size);
|
||||||
if (stack_level == -1)
|
if (stack_level == -1)
|
||||||
{
|
{
|
||||||
g.DebugHookIdInfoId = query_main_id;
|
g.DebugHookIdInfoId = query_main_id;
|
||||||
@@ -17972,7 +17973,7 @@ void ImGui::ShowIDStackToolWindow(bool* p_open)
|
|||||||
SetClipboardText(result_path);
|
SetClipboardText(result_path);
|
||||||
}
|
}
|
||||||
|
|
||||||
Text("- Path \"%s\"", result_path);
|
Text("- Path \"%s\"", tool->ResultsComplete ? result_path : "");
|
||||||
#ifdef IMGUI_ENABLE_TEST_ENGINE
|
#ifdef IMGUI_ENABLE_TEST_ENGINE
|
||||||
Text("- Label \"%s\"", tool->QueryMainId ? ImGuiTestEngine_FindItemDebugLabel(&g, tool->QueryMainId) : "");
|
Text("- Label \"%s\"", tool->QueryMainId ? ImGuiTestEngine_FindItemDebugLabel(&g, tool->QueryMainId) : "");
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -2132,9 +2132,10 @@ struct ImGuiStackLevelInfo
|
|||||||
struct ImGuiIDStackTool
|
struct ImGuiIDStackTool
|
||||||
{
|
{
|
||||||
int LastActiveFrame;
|
int LastActiveFrame;
|
||||||
int StackLevel; // -1: query stack and resize Results, >= 0: individual stack level
|
int StackLevel; // -1: query stack and resize Results, >= 0: individual stack level.
|
||||||
ImGuiID QueryMainId; // ID to query details for
|
ImGuiID QueryMainId; // ID to query details for.
|
||||||
ImVector<ImGuiStackLevelInfo> Results;
|
ImVector<ImGuiStackLevelInfo> Results;
|
||||||
|
bool ResultsComplete; // All sub-query have succeeeded, result is complete.
|
||||||
bool QueryHookActive; // Used to disambiguate the case where DebugHookIdInfoId == 0 which is valid.
|
bool QueryHookActive; // Used to disambiguate the case where DebugHookIdInfoId == 0 which is valid.
|
||||||
bool OptHexEncodeNonAsciiChars;
|
bool OptHexEncodeNonAsciiChars;
|
||||||
bool OptCopyToClipboardOnCtrlC;
|
bool OptCopyToClipboardOnCtrlC;
|
||||||
|
|||||||
Reference in New Issue
Block a user