template<class ... Layers>
Magnum::Ui::BasicUserInterface class

Base for user interfaces.

User interface fills up whole screen and consists of planes with specific layers.

Base classes

class AbstractUserInterface
Non-templated base for user interfaces.

Constructors, destructors, conversion operators

BasicUserInterface(const Vector2& size, const Vector2i& windowSize) explicit
Constructor.

Public functions

void update()
Update the interface.

Protected functions

void draw(const Containers::StaticArray<sizeof...(Layers), Containers::Reference<AbstractUiShader>>& shaders)
Draw the interface using designated shader for each layer.

Function documentation

template<class ... Layers>
Magnum::Ui::BasicUserInterface<Layers>::BasicUserInterface(const Vector2& size, const Vector2i& windowSize) explicit

Constructor.

Parameters
size User interface size
windowSize Size of the window to which all inputs events are related

All positioning and sizing inside the interface is done in regard to size, without taking actual screen size into account. This allows to have DPI-independent sizes.

template<class ... Layers>
void Magnum::Ui::BasicUserInterface<Layers>::update()

Update the interface.

Calls BasicPlane::update() on all planes in the interface. Called automatically at the beginning of draw(), but scheduling it explicitly in a different place might reduce the need for CPU/GPU synchronization.