Fix any remaining bugs with anchor positioning system, use LocalPosition for UIElement, and make containers use that for arrangement.

This commit is contained in:
2025-06-24 19:45:18 +02:00
parent b228f04670
commit 03668849bc
13 changed files with 74 additions and 72 deletions

View File

@@ -9,7 +9,7 @@ public interface IElement
/// <summary>
/// This element's position in pixels relative to the viewport top-left edge.
/// </summary>
public Vector2 Position { get; set; }
public Vector2 GlobalPosition { get; }
/// <summary>
/// The size of this element.
/// </summary>
@@ -21,17 +21,17 @@ public interface IParentableElement
/// <summary>
/// This parentable element's children.
/// </summary>
public IReadOnlyList<IElement> Children { get; }
public IReadOnlyList<UIElement> Children { get; }
/// <summary>
/// Add a child element to this element.
/// </summary>
/// <param name="child">Child <see cref="IElement"/>.</param>
public void AddChild(IElement child);
/// <param name="child">Child <see cref="UIElement"/>.</param>
public void AddChild(UIElement child);
/// <summary>
/// Remove a child element from this element.
/// </summary>
/// <param name="child">Child <see cref="IElement"/> to remove.</param>
public void RemoveChild(IElement child);
/// <param name="child">Child <see cref="UIElement"/> to remove.</param>
public void RemoveChild(UIElement child);
}
public interface IResizeableElement