diff options
author | crupest <crupest@outlook.com> | 2021-12-04 18:06:43 +0800 |
---|---|---|
committer | crupest <crupest@outlook.com> | 2021-12-04 18:06:43 +0800 |
commit | 942f1d34c48e61a853db745cd68e46db13266a5c (patch) | |
tree | fdb859933dbb302404391ed686bae8c7126c96ee /src/ui/controls/LayoutControl.cpp | |
parent | 2317061516b0bd0002467acbead3120cbe49a6c5 (diff) | |
download | cru-942f1d34c48e61a853db745cd68e46db13266a5c.tar.gz cru-942f1d34c48e61a853db745cd68e46db13266a5c.tar.bz2 cru-942f1d34c48e61a853db745cd68e46db13266a5c.zip |
...
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); |