Lysa  0.0
Lysa 3D Engine
RenderingWindow Class Referenceabstract

Detailed Description

A platform window with an associated GPU render target.

Lua full name: lysa.RenderingWindow

Public Member Functions

nil close ()
 Closes and destroys the window. More...
 
Rect get_rect ()
 Returns the window position and size as a Rect. More...
 
nil set_title (title: string)
 Sets the window title bar text. More...
 
nil set_mouse_mode (mode: integer)
 Sets the mouse capture/visibility mode (see lysa.MouseMode). More...
 
nil set_mouse_cursor (cursor: integer)
 Sets the mouse cursor shape (see lysa.MouseCursor). More...
 
nil reset_mouse_position ()
 Resets the mouse position to the center of the window. More...
 
boolean is_mouse_hidden ()
 Returns true if the mouse cursor is hidden. More...
 
float2 get_mouse_position ()
 Returns the current mouse position in window coordinates. More...
 
nil set_mouse_position (pos: float2)
 Sets the mouse position in window coordinates. More...
 
table<integer,lysa.Rect> get_full_screen_modes ()static
 Returns a table of available fullscreen resolutions. More...
 

Properties

integer id
 Constructor: RenderingWindow() RenderingWindow(cfg)
 
boolean paused
 Whether the window's render loop is paused.
 
boolean minimized
 True if the window is minimized. (read-only)
 
boolean mouse_hidden
 True if the mouse cursor is hidden. (read-only)
 

Member Function Documentation

nil close ( )

Closes and destroys the window.

Rect get_rect ( )

Returns the window position and size as a Rect.

Returns
Rect
nil set_title ( string  title)

Sets the window title bar text.

Parameters
titlestring
nil set_mouse_mode ( integer  mode)

Sets the mouse capture/visibility mode (see lysa.MouseMode).

Parameters
modeinteger
nil set_mouse_cursor ( integer  cursor)

Sets the mouse cursor shape (see lysa.MouseCursor).

Parameters
cursorinteger
nil reset_mouse_position ( )

Resets the mouse position to the center of the window.

boolean is_mouse_hidden ( )

Returns true if the mouse cursor is hidden.

Returns
boolean
float2 get_mouse_position ( )

Returns the current mouse position in window coordinates.

Returns
float2
nil set_mouse_position ( float2  pos)

Sets the mouse position in window coordinates.

Parameters
posfloat2
table<integer,lysa.Rect> get_full_screen_modes ( )
static

Returns a table of available fullscreen resolutions.

Returns
table<integer,lysa.Rect>

Property Documentation

integer id

Constructor: RenderingWindow() RenderingWindow(cfg)

boolean paused

Whether the window's render loop is paused.

boolean minimized

True if the window is minimized. (read-only)

boolean mouse_hidden

True if the mouse cursor is hidden. (read-only)