mirror of
https://github.com/Drezil/imgui.git
synced 2025-07-04 12:08:47 +02:00
BeginChild: half-fixed child window name longer than 255 conflicting, merely raised the limit by using our shared large buffer. Comments.
This commit is contained in:
@ -4835,16 +4835,15 @@ bool ImGui::BeginChildEx(const char* name, ImGuiID id, const ImVec2& size_arg, b
|
||||
SetNextWindowSize(size);
|
||||
|
||||
// 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_%08X", parent_window->Name, name, id);
|
||||
ImFormatString(g.TempBuffer, IM_ARRAYSIZE(g.TempBuffer), "%s/%s_%08X", parent_window->Name, name, id);
|
||||
else
|
||||
ImFormatString(title, IM_ARRAYSIZE(title), "%s/%08X", parent_window->Name, id);
|
||||
ImFormatString(g.TempBuffer, IM_ARRAYSIZE(g.TempBuffer), "%s/%08X", parent_window->Name, id);
|
||||
|
||||
const float backup_border_size = g.Style.ChildBorderSize;
|
||||
if (!border)
|
||||
g.Style.ChildBorderSize = 0.0f;
|
||||
bool ret = Begin(title, NULL, flags);
|
||||
bool ret = Begin(g.TempBuffer, NULL, flags);
|
||||
g.Style.ChildBorderSize = backup_border_size;
|
||||
|
||||
ImGuiWindow* child_window = g.CurrentWindow;
|
||||
|
Reference in New Issue
Block a user