diff --git a/src/experimental/platform/imgui_widgets.h b/src/experimental/platform/imgui_widgets.h index 40b8c47e..478bbfc2 100644 --- a/src/experimental/platform/imgui_widgets.h +++ b/src/experimental/platform/imgui_widgets.h @@ -265,6 +265,19 @@ inline bool ImGui_IsChordJustPressed(ImGuiKeyChord chord) { return ImGui::IsKeyChordPressed(chord, 0); } +// Begin a boxed section with outer borders - use EndBoxSection to close. +inline bool BeginBoxSection(const char* id, ImGuiTableFlags extra_flags = 0) { + ImGuiTableFlags flags = ImGuiTableFlags_BordersOuter | extra_flags; + if (ImGui::BeginTable(id, 1, flags)) { + ImGui::TableNextRow(); + ImGui::TableNextColumn(); + return true; + } + return false; +} + +inline void EndBoxSection() { ImGui::EndTable(); } + // Saves the given contents to the clipboard if the clipboard is available. void MaybeSaveToClipboard(const std::string& contents);