Add MarginContainer, mark parent elements dirty when child gets marked dirty too.
This commit is contained in:
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user