mirror of
https://github.com/Drezil/imgui.git
synced 2025-07-04 12:08:47 +02:00
BeginChild(): Fixed BeginChild(const char*, ...) variation erroneously not applying the ID stack to the provided string to uniquely identify the child window. This was undoing an intentional change introduced in 1.50 and broken in 1.60. (#1698, #894, #713) + reworked the Begin/BeginChild comments in imgui.h.
This commit is contained in:
@ -4036,10 +4036,10 @@ static bool ImGui::BeginChildEx(const char* name, ImGuiID id, const ImVec2& size
|
||||
size.y = ImMax(content_avail.y + size.y, 4.0f);
|
||||
SetNextWindowSize(size);
|
||||
|
||||
// Name
|
||||
// Build up name. If you need to append to a same child from multiple location in the ID stack, use BeginChild(ImGuiID id) with a stable value.
|
||||
char title[256];
|
||||
if (name)
|
||||
ImFormatString(title, IM_ARRAYSIZE(title), "%s/%s", parent_window->Name, name);
|
||||
ImFormatString(title, IM_ARRAYSIZE(title), "%s/%s_%08X", parent_window->Name, name, id);
|
||||
else
|
||||
ImFormatString(title, IM_ARRAYSIZE(title), "%s/%08X", parent_window->Name, id);
|
||||
|
||||
|
Reference in New Issue
Block a user