Layer

A layer of components.

Constructors

this
this(string screenName)

Creates a new layer.

Members

Functions

addComponent
void addComponent(Component component, string name, bool cleanOldComponent)

Adds a component to the layer.

clean
void clean()

Cleans the layer and all its components.

clear
void clear()

Clears the layer for its components.

getComponent
Component getComponent(string name)

Gets a component from the layer. You msut cast to the original component type for it to be useful.

keyPress
void keyPress(KeyboardKey key, bool stopEvent)

Handles key press events and delegates them to its components.

keyRelease
void keyRelease(KeyboardKey key, bool stopEvent)

Handles key release events and delegates them to its components.

mouseMove
void mouseMove(FloatVector mousePosition, bool stopEvent)

Handles mouse move events and delegates them to its components.

mousePress
void mousePress(MouseButton button, bool stopEvent)

Handles mouse button press events and delegates them to its components.

mouseRelease
void mouseRelease(MouseButton button, bool stopEvent)

Handles mouse button release events and delegates them to its components.

refresh
void refresh(size_t width, size_t height)

Refreshes the layer and its components with a given width and height. Usually the resolution width and height.

removeComponent
void removeComponent(string name, bool cleanOldComponent)

Removes a component from the layer.

render
void render(ExternalWindow window)

Will render the components of the layer to the given window.

Properties

length
size_t length [@property getter]

Gets the amount of components within the layer.

screenName
string screenName [@property getter]

Gets the screen name.

Meta