InputTextMultiline: Provide label to BeginChildEx so internal window name hold a little more context.
diff --git a/imgui_widgets.cpp b/imgui_widgets.cpp
index d5eed2c..a5aa86b 100644
--- a/imgui_widgets.cpp
+++ b/imgui_widgets.cpp
@@ -3458,14 +3458,23 @@
EndGroup();
return false;
}
- if (!BeginChildFrame(id, frame_bb.GetSize()))
+
+ // We reproduce the contents of BeginChildFrame() in order to provide 'label' so our window internal data are easier to read/debug.
+ PushStyleColor(ImGuiCol_ChildBg, style.Colors[ImGuiCol_FrameBg]);
+ PushStyleVar(ImGuiStyleVar_ChildRounding, style.FrameRounding);
+ PushStyleVar(ImGuiStyleVar_ChildBorderSize, style.FrameBorderSize);
+ PushStyleVar(ImGuiStyleVar_WindowPadding, style.FramePadding);
+ bool child_visible = BeginChildEx(label, id, frame_bb.GetSize(), true, ImGuiWindowFlags_NoMove | ImGuiWindowFlags_AlwaysUseWindowPadding);
+ PopStyleVar(3);
+ PopStyleColor();
+ if (!child_visible)
{
- EndChildFrame();
+ EndChild();
EndGroup();
return false;
}
draw_window = g.CurrentWindow; // Child window
- draw_window->DC.NavLayerActiveMaskNext |= draw_window->DC.NavLayerCurrentMask; // This is to ensure that EndChild() will display a navigation highlight
+ draw_window->DC.NavLayerActiveMaskNext |= draw_window->DC.NavLayerCurrentMask; // This is to ensure that EndChild() will display a navigation highlight so we can "enter" into it.
inner_size.x -= draw_window->ScrollbarSizes.x;
}
else
@@ -4151,7 +4160,7 @@
if (is_multiline)
{
Dummy(text_size + ImVec2(0.0f, g.FontSize)); // Always add room to scroll an extra line
- EndChildFrame();
+ EndChild();
EndGroup();
}