WIP: UI system, containers and widgets.
This commit is contained in:
28
Voile/Source/UI/IElement.cs
Normal file
28
Voile/Source/UI/IElement.cs
Normal 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);
|
||||
}
|
||||
Reference in New Issue
Block a user