diff options
Diffstat (limited to 'src/ui/controls/LayoutControl.cpp')
-rw-r--r-- | src/ui/controls/LayoutControl.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/ui/controls/LayoutControl.cpp b/src/ui/controls/LayoutControl.cpp index 5954853e..e5a38445 100644 --- a/src/ui/controls/LayoutControl.cpp +++ b/src/ui/controls/LayoutControl.cpp @@ -3,6 +3,12 @@ #include "cru/ui/render/RenderObject.hpp" namespace cru::ui::controls { +void LayoutControl::ClearChildren() { + while (GetChildren().size() > 0) { + RemoveChild(0); + } +} + void LayoutControl::OnAddChild(Control* child, Index position) { if (container_render_object_ != nullptr) { container_render_object_->AddChild(child->GetRenderObject(), position); |