mirror of
https://github.com/Drezil/imgui.git
synced 2025-07-06 04:58:47 +02:00
Added PushId() GetId() variants that takes string range to avoid user making unnecessary copies
This commit is contained in:
2
imgui.h
2
imgui.h
@ -260,10 +260,12 @@ namespace ImGui
|
||||
// If you are creating widgets in a loop you most likely want to push a unique identifier so ImGui can differentiate them
|
||||
// You can also use "##extra" within your widget name to distinguish them from each others (see 'Programmer Guide')
|
||||
IMGUI_API void PushID(const char* str_id); // push identifier into the ID stack. IDs are hash of the *entire* stack!
|
||||
IMGUI_API void PushID(const char* str_id_begin, const char* str_id_end);
|
||||
IMGUI_API void PushID(const void* ptr_id);
|
||||
IMGUI_API void PushID(const int int_id);
|
||||
IMGUI_API void PopID();
|
||||
IMGUI_API ImGuiID GetID(const char* 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_API ImGuiID GetID(const char* str_id_begin, const char* str_id_end);
|
||||
IMGUI_API ImGuiID GetID(const void* ptr_id);
|
||||
|
||||
// Widgets
|
||||
|
Reference in New Issue
Block a user