KumiScript/renderer/GraphicalUserInterface.cs

36 lines
797 B
C#
Raw Normal View History

namespace KumiScript.Renderer
{
public class GraphicalUserInterface : IDisposable
{
List<InterfaceElement> _elements;
public GraphicalUserInterface()
{
_elements = new List<InterfaceElement>(16);
}
public void DrawInterface()
{
foreach (InterfaceElement e in _elements)
{
e.Draw(0, 0);
}
}
public void AddElement(InterfaceElement e)
{
_elements.Add(e);
return;
}
public bool RemoveElement(InterfaceElement e)
{
return _elements.Remove(e);
}
public void Dispose()
{
foreach (InterfaceElement e in _elements)
e.Dispose();
}
}
}