Screen

A screen.

Constructors

this
this(string screenName)

Creates a new screen.

Members

Functions

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

Adds a component to a layer.

clean
void clean()

Cleans the screen for its native objects.

clear
void clear(size_t index)

Clears a layer of its components.

clearAllLayersButBackground
void clearAllLayersButBackground()

Clears all layer components except for the background.

getComponent
Component getComponent(size_t index, string name)

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

getLayer
Layer getLayer(size_t index)

Gets a layer of the screen.

keyPress
void keyPress(KeyboardKey key)

Handles key press events and delegates them to its layers.

keyRelease
void keyRelease(KeyboardKey key)

Handles key release events and delegates them to its layers.

mouseMove
void mouseMove(ptrdiff_t x, ptrdiff_t y)

Handles mouse move events and delegates them to its layers.

mousePress
void mousePress(MouseButton button)

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

mouseRelease
void mouseRelease(MouseButton button)

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

refresh
void refresh(size_t width, size_t height)

Refreshes the screen and its layers and their components with a given width and height. Usually the resolution width and height.

removeComponent
void removeComponent(size_t index, string name, bool cleanOldComponent)

Removes a component from a layer.

render
void render(ExternalWindow window)

Will render the screen, its layers and their components.

setWidthAndHeight
void setWidthAndHeight(size_t width, size_t height)

Sets the width and height of the screen.

shouldClearLayers
bool shouldClearLayers(string[] data)

A function that tells the engine whether the screen should clear layers before updating and becoming active.

update
void update(string[] data)

Updates the screen with data.

updateBackground
void updateBackground(string mediaFile)

Updates the background with a media file.

updateBackground
void updateBackground(NovelateImageAnimation backgroundAnimation)

Updates the background with an animation.

Properties

height
size_t height [@property getter]

Gets the height of the screen. Usually the resolution height.

name
string name [@property getter]

Gets the screen name.

width
size_t width [@property getter]

Gets the width of the screen. Usually the resolution width.

Meta