PlayScreen

The play screen.

Constructors

this
this()

Creates a new play screen.

Members

Functions

shouldClearLayers
bool shouldClearLayers(string[] data)

See: Screen.shouldClearLayers()

update
void update(string[] data)

See: Screen.update()

Inherited Members

From Screen

updateBackground
void updateBackground(string mediaFile)

Updates the background with a media file.

updateBackground
void updateBackground(NovelateImageAnimation backgroundAnimation)

Updates the background with an animation.

clean
void clean()

Cleans the screen for its native objects.

setWidthAndHeight
void setWidthAndHeight(size_t width, size_t height)

Sets the width and height of the screen.

clearAllLayersButBackground
void clearAllLayersButBackground()

Clears all layer components except for the background.

shouldClearLayers
bool shouldClearLayers(string[] data)

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

width
size_t width [@property getter]

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

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.

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

Adds a component to a layer.

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

Removes a component from a layer.

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.

clear
void clear(size_t index)

Clears a layer of its components.

render
void render(ExternalWindow window)

Will render the screen, its layers and their components.

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.

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.

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.

mouseMove
void mouseMove(ptrdiff_t x, ptrdiff_t y)

Handles mouse move events and delegates them to its layers.

update
void update(string[] data)

Updates the screen with data.

Meta