Add MarginContainer, mark parent elements dirty when child gets marked dirty too.

This commit is contained in:
2025-06-25 00:35:35 +02:00
parent 5bf052db96
commit 64d3dba42d
5 changed files with 111 additions and 13 deletions

View File

@@ -60,6 +60,18 @@ public abstract class Container : UIElement, IParentableElement
}
}
public override void MarkDirty()
{
base.MarkDirty();
foreach (var child in _children)
{
if (child is not IUpdatableElement updatable) continue;
updatable.MarkDirty();
}
}
/// <summary>
/// Called when this <see cref="Container"/> has to rearrange its children.
/// </summary>