Class: Screen

olympe.ui.std. Screen

Abstract class to representing a screen. A Screen is a container for other UI elements. A subclass of Screen has to implement olympe.std.ui.Screen#render.


<abstract> new Screen()

Creates an instance of Screen.

Methods


<protected> notifySubscribers(eventId)

Method to be called by subclass to notify all subscribers that an event happened

Parameters:
Name Type Description
eventId string

registerEvent(eventId, callbackFunction)

Register to an event provided by this screen.

Parameters:
Name Type Description
eventId string

The event ID.

callbackFunction function

The callback function.


<abstract> render(dimension [, context])

Creates the content of the screen. It should return a DockableElement representing the content of this screen (typically a layout or other container). Subclasses have to implement this method.

Parameters:
Name Type Argument Description
dimension olympe.df.PVector2

The dimension of this screen.

context * <optional>

The context.

Returns:

the Dockable element representing the content of this screen.

Type
olympe.df.Proxy.<olympe.ui.std.DockableElement> | olympe.ui.std.DockableElement