mirror of
https://github.com/Drezil/imgui.git
synced 2025-07-05 20:48:46 +02:00
BeginChild(): Internal name used by child windows now omits the hash/id if the child window is submitted in root of id stack of parent window.
# Conflicts: # docs/CHANGELOG.txt # imgui.h
This commit is contained in:
@ -5444,7 +5444,9 @@ bool ImGui::BeginChildEx(const char* name, ImGuiID id, const ImVec2& size_arg, b
|
||||
|
||||
// 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.
|
||||
const char* temp_window_name;
|
||||
if (name)
|
||||
if (name && parent_window->IDStack.back() == parent_window->ID)
|
||||
ImFormatStringToTempBuffer(&temp_window_name, NULL, "%s/%s", parent_window->Name, name); // May omit ID if in root of ID stack
|
||||
else if (name)
|
||||
ImFormatStringToTempBuffer(&temp_window_name, NULL, "%s/%s_%08X", parent_window->Name, name, id);
|
||||
else
|
||||
ImFormatStringToTempBuffer(&temp_window_name, NULL, "%s/%08X", parent_window->Name, id);
|
||||
|
Reference in New Issue
Block a user