-
Notifications
You must be signed in to change notification settings - Fork 2
Screen
The Screen class is used for managing the display of elements onto various screens. Each screen has child nodes, which are drawn to a number of terminals.
Screen( Application application, number width, number height )
Note, this is done internally when done with Application:addScreen().
Screen.canvas - ScreenCanvas
The canvas of the screen which will be drawn to the terminals of the screen.
Screen.changed - boolean
Whether the Screen has changes to be drawn.
Screen.parent - Application
The parent Application of the screen.
This method is chainable.
Screen:setChanged( boolean state = true )
Tells the Screen it has changes to be drawn. state defaults to true if not given.
This method is chainable.
Screen:addMonitor( string side )
Adds a monitor on the side given to the screen. This will throw an IncorrectParameterException if the side passed is not a monitor.
This method is chainable.
Screen:removeMonitor( string side )
Removes a monitor from the side given. This will not error if the side isn't currently added.
boolean uses = Screen:usesMonitor( string side )
Returns whether the Screen draws to a monitor on the side given.
This method is chainable.
Screen:addTerminal( table t )
Adds a terminal redirect to the screen's terminals. The terminal will be drawn to.
This method is chainable.
Screen:removeTerminal( table t )
Removes a terminal from the screen's terminals. The terminal will no longer be drawn to.
Internal.
Screen:draw()
Draws changes to terminals.
Screen:handle( Event event )
Passes the event to child elements of the screen.
Screen:update( number dt )
Updates the child elements of the screen.
- Exception
- DynamicValueException
- ExpressionException
- IncorrectConstructorException
- IncorrectParameterException
- ParserException
- ResourceLoadException
- ThreadRuntimeException