Update arrangement logic for containers, remove position property from Rect, add Size property to IElement.

This commit is contained in:
2025-06-19 15:08:23 +02:00
parent e499691714
commit 6affded730
9 changed files with 56 additions and 23 deletions

View File

@@ -7,6 +7,7 @@ namespace Voile.UI;
public interface IElement
{
public Vector2 Position { get; set; }
public Rect Size { get; set; }
}
public interface IParentableElement
@@ -15,6 +16,14 @@ public interface IParentableElement
public void AddChild(IElement child);
}
public interface IResizeableElement
{
/// <summary>
/// Get a minimum rectangle size for this element.
/// </summary>
public abstract Rect MinimumRect { get; }
}
public interface IUpdatableElement
{
void Update();