moonbase.video functions - Protovision/moonbase GitHub Wiki
moonbase.video.clear( )
Fills the window with the current draw color
moonbase.video.drawLine( p1, p2 )
Draws a line with the current draw color. p1 is an array containing the x and y coordinates of the first point, and p2 is for the second point
moonbase.video.drawRect( r )
Draws a rectangle with the current draw color. r is an array containing the x coordinate, y coordinate, width, and height of the rectangle
moonbase.video.fillRect( r )
Similar to moonbase.video.drawRect except the rectangle is filled in this case
moonbase.video.getBrightness( )
Returns a normalized number representing the brightness of the window
moonbase.video.getDisplay( )
Returns a table representing the current display of the window. See moonbase.video.displays wiki section for details of this table
moonbase.video.getDriver( )
Returns a string representing the current video driver of the window
moonbase.video.getMode( )
Returns a table representing the current display mode of the window. See moonbase.video.displays wiki section for details of this table
moonbase.video.getPosition( )
Returns an array containing the x and y coordinates of the current position of the window
moonbase.video.getSize( )
Returns an array containing the width and height of the window
moonbase.video.getTitle( )
Returns a string containing the title of the window
moonbase.video.isFullscreen( )
Returns a boolean of if the window is fullscreen
moonbase.video.isInputGrabbed( )
Returns a boolean of if the window has input grab enabled
moonbase.video.messageBox( message )
Displays a simple message box, suspending both the game and the engine until the user acknowledges the message
moonbase.video.restart( )
Restarts the moonbase.video, applying any changes made pertaining to the preferred video driver
moonbase.video.setBrightness( brightness )
Sets the brightness of the window. brightness is a normalized number from 0.0 to 1.0
moonbase.video.setDrawColor( color )
Sets the draw color. color is a string representing the hexadecimal rgba color
moonbase.video.setDriver( driver )
Sets the video render driver. driver is a string containing the name of the video render driver. See the moonbase.video.drivers array for a list of render driver strings. Call moonbase.video.restart( ) to apply changes
moonbase.video.setFullscreen( bool )
Enables or disables full screen mode
moonbase.video.setInputGrabbed( bool )
Enables or disables input grabbing for the window
moonbase.video.setMode( mode )
Sets the mode to use when the window is fullscreen. See moonbase.video.displays wiki section for details on the format of mode
moonbase.video.setPosition( position )
Sets the position of the window on the display. position is an array containing the x and y coordinates
moonbase.video.setSize( size )
Sets the size of the window when not in fullscreen mode. size is an array containing the width and height
moonbase.video.setTitle( title )
Sets the title of the window