WIP: UI system, containers and widgets.

This commit is contained in:
2025-06-19 14:30:20 +02:00
parent a450ed9819
commit 806c9cc1d4
15 changed files with 341 additions and 11 deletions

View File

@@ -0,0 +1,28 @@
using System.Numerics;
using Voile.Input;
using Voile.Rendering;
namespace Voile.UI;
public interface IElement
{
public Vector2 Position { get; set; }
}
public interface IParentableElement
{
public IReadOnlyList<IElement> Children { get; }
public void AddChild(IElement child);
}
public interface IRenderableElement
{
public bool Visible { get; set; }
public void Render(RenderSystem renderer, Style style);
}
public interface IInputElement
{
public bool IgnoreInput { get; set; }
void Input(IInputAction action);
}