// If you are creating repeated widgets in a loop you most likely want to push a unique identifier so ImGui can differentiate them.
IMGUI_APIvoidPushID(constchar*str_id);// push identifier into the ID stack. IDs are hash of the *entire* stack!
IMGUI_APIvoidPushID(constvoid*ptr_id);
IMGUI_APIvoidPushID(constintint_id);
IMGUI_APIvoidPopID();
IMGUI_APIImGuiIDGetID(constchar*str_id);// calculate unique ID (hash of whole ID stack + given parameter). useful if you want to query into ImGuiStorage yourself. otherwise rarely needed.
IMGUI_APIImGuiIDGetID(constvoid*ptr_id);
// Widgets
IMGUI_APIvoidText(constchar*fmt,...);
@ -587,22 +590,38 @@ struct ImGuiTextBuffer
};
// Helper: Key->value storage
// - Store collapse state for a tree
// - Store color edit options, etc.
// - Store collapse state for a tree (Int 0/1)
// - Store color edit options (Int using values in ImGuiColorEditMode enum).
// - Custom user storage for temporary values.
// Typically you don't have to worry about this since a storage is held within each Window.
// Declare your own storage if you want to manipulate the open/close state of a particular sub-tree in your interface.
// Declare your own storage if:
// - You want to manipulate the open/close state of a particular sub-tree in your interface (tree node uses Int 0/1 to store their state).
// - You want to store custom debug data easily without adding or editing structures in your code.