Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Window

Window

Application window


Functions

width(self)

->number

Return the window’s width.

height(self)

->number

Return the window’s height

is_fullscreen(self)

->boolean

Return whether the window is fullscreen.

is_hidden(self)

->boolean

Return whether the window is hidden.

is_minimized(self)

->boolean

Return whether the window is minimized.

is_maximized(self)

->boolean

Return whether the window is maximized.

is_focused(self)

->boolean

Return whether the window is focused.

toggle_fullscreen(self)

Togggle the window between fullscreen and not.

toggle_borderless_windowed(self)

Togggle the window having a border or not.

maximize(self)

Maximize the window.

minimize(self)

Minimize the window.

restore(self)

Undo a maximize for the window.

set_window_title(self, title : string)

Set the window’s title.

set_window_min_size(self, width : number, height : number)

Set the minimum size the window can be at.

set_window_max_size(self, width : number, height : number)

Set the maximum size the window can be at.

set_window_size(self, width : number, height : number)

Set the window’s size.

is_key_pressed(self, key : KeyboardKey)

Check whether key was pressed.

is_key_down(self, key : KeyboardKey)

Check whether key is being held down.

is_key_released(self, key : KeyboardKey)

Check whether key is being released.

is_mouse_button_pressed(self, button : MouseButton)

Check whether mouse button was pressed.

is_mouse_button_down(self, button : MouseButton)

Check whether mouse button was held down.

is_mouse_button_released(self, button : MouseButton)

Check whether mouse button was released.

get_mouse_position(self)

->Vec2

Get the mouse position relative to the window.

get_mouse_delta(self)

->Vec2

Get the delta of the mouse’s movement.

get_mouse_wheel_move(self)

->Vec2

Get the movement of the mouse wheel.

set_mouse_cursor(self, cursor : MouseCursor)

Set mouse cursor.

open_url(self, url : string)

Open the given URL in the user’s default browser.