@ -217,7 +217,7 @@ Interactive widgets (such as calls to Button buttons) need a unique ID.
**Unique IDs are used internally to track active widgets and occasionally associate state to widgets.<BR>
Unique IDs are implicitly built from the hash of multiple elements that identify the "path" to the UI element.**
Since Dear ImGui 1.85, you can use `Demo>Tools>Stack Tool` or call `ImGui::ShowStackToolWindow()`. The tool display intermediate values leading to the creation of a unique ID, making things easier to debug and understand.
Since Dear ImGui 1.85, you can use `Demo>Tools>Stack Tool` or call `ImGui::ShowIdStackToolWindow()`. The tool display intermediate values leading to the creation of a unique ID, making things easier to debug and understand.
// It is very strongly recommended to NOT disable the demo windows and debug tool during development. They are extremely useful in day to day work. Please read comments in imgui_demo.cpp.
//#define IMGUI_DISABLE // Disable everything: all headers and source files will be empty.
//#define IMGUI_DISABLE_DEMO_WINDOWS // Disable demo windows: ShowDemoWindow()/ShowStyleEditor() will be empty.
//#define IMGUI_DISABLE_DEBUG_TOOLS // Disable metrics/debugger and other debug tools: ShowMetricsWindow(), ShowDebugLogWindow() and ShowStackToolWindow() will be empty (this was called IMGUI_DISABLE_METRICS_WINDOW before 1.88).
//#define IMGUI_DISABLE_DEBUG_TOOLS // Disable metrics/debugger and other debug tools: ShowMetricsWindow(), ShowDebugLogWindow() and ShowIdStackToolWindow() will be empty.
//---- Don't implement some functions to reduce linkage requirements.
//#define IMGUI_DISABLE_WIN32_DEFAULT_CLIPBOARD_FUNCTIONS // [Win32] Don't implement default clipboard handler. Won't use and link with OpenClipboard/GetClipboardData/CloseClipboard etc. (user32.lib/.a, kernel32.lib/.a)
MetricsHelpMarker("Will call the IM_DEBUG_BREAK() macro to break in debugger.\nWarning: If you don't have a debugger attached, this will probably crash.");
// Stack Tool is your best friend!
Checkbox("Show Debug Log",&cfg->ShowDebugLog);
SameLine();
MetricsHelpMarker("You can also call ImGui::ShowDebugLogWindow() from your code.");
// Stack Tool is your best friend!
Checkbox("Show Stack Tool",&cfg->ShowStackTool);
Checkbox("Show ID Stack Tool",&cfg->ShowIdStackTool);
SameLine();
MetricsHelpMarker("You can also call ImGui::ShowStackToolWindow() from your code.");
MetricsHelpMarker("You can also call ImGui::ShowIdStackToolWindow() from your code.");
Checkbox("Show windows begin order",&cfg->ShowWindowsBeginOrder);
Checkbox("Show windows rectangles",&cfg->ShowWindowsRects);
IMGUI_APIvoidShowDemoWindow(bool*p_open=NULL);// create Demo window. demonstrate most ImGui features. call this to learn about the library! try to make it always available in your application!
IMGUI_APIvoidShowMetricsWindow(bool*p_open=NULL);// create Metrics/Debugger window. display Dear ImGui internals: windows, draw commands, various internal state, etc.
IMGUI_APIvoidShowDebugLogWindow(bool*p_open=NULL);// create Debug Log window. display a simplified log of important dear imgui events.
IMGUI_APIvoidShowStackToolWindow(bool*p_open=NULL);// create Stack Tool window. hover items with mouse to query information about the source of their unique ID.
IMGUI_APIvoidShowIdStackToolWindow(bool*p_open=NULL);// create Stack Tool window. hover items with mouse to query information about the source of their unique ID.
IMGUI_APIvoidShowAboutWindow(bool*p_open=NULL);// create About window. display Dear ImGui version, credits and build/system information.
IMGUI_APIvoidShowStyleEditor(ImGuiStyle*ref=NULL);// add style editor block (not a window). you can pass in a reference ImGuiStyle structure to compare to, revert to and save to (else it uses the default style)
IMGUI_APIboolShowStyleSelector(constchar*label);// add style selector block (not a window), essentially a combo listing the default styles.
ImGuiIDDebugHookIdInfo;// Will call core hooks: DebugHookIdInfo() from GetID functions, used by Stack Tool [next HoveredId/ActiveId to not pull in an extra cache-line]
ImGuiIDDebugHookIdInfo;// Will call core hooks: DebugHookIdInfo() from GetID functions, used by ID Stack Tool [next HoveredId/ActiveId to not pull in an extra cache-line]
ImGuiIDHoveredId;// Hovered widget, filled during the frame
ImGuiIDHoveredIdPreviousFrame;
boolHoveredIdAllowOverlap;
@ -2130,7 +2130,7 @@ struct ImGuiContext
ImU8DebugItemPickerMouseButton;
ImGuiIDDebugItemPickerBreakId;// Will call IM_DEBUG_BREAK() when encountering this ID
ImGuiMetricsConfigDebugMetricsConfig;
ImGuiStackToolDebugStackTool;
ImGuiIdStackToolDebugIdStackTool;
// Misc
floatFramerateSecPerFrame[60];// Calculate estimate of framerate for user over the last 60 frames..