1
0
Fork 0
mirror of https://github.com/Ellpeck/MLEM.git synced 2024-11-22 12:58:33 +01:00

added a method to remove all children from an element

This commit is contained in:
Ellpeck 2019-09-12 11:52:47 +02:00
parent 3f66430d90
commit 0ad17fc40c

View file

@ -178,6 +178,12 @@ namespace MLEM.Ui.Elements {
this.SetAreaDirty();
}
public void RemoveChildren() {
for (var i = this.Children.Count - 1; i >= 0; i--) {
this.RemoveChild(this.Children[i]);
}
}
public void SetAreaDirty() {
this.areaDirty = true;
if (this.Anchor >= Anchor.AutoLeft && this.Parent != null)