window_set_rectangle

With this function you can set the position of the game window within the browser (HTML5) or display (Windows, Ubuntu (Linux) or macOS) and set the scale of the window too. For more information on window position and window size, see window_set_position() and window_set_size().

 

Syntax:

window_set_rectangle(x, y, w, h);

ArgumentType Description
xReal The new x coordinate of the window.
yReal The new y coordinate of the window.
wReal The new width of the window.
hReal The new height of the window.

 

Returns:

N/A

 

Example:

window_set_rectangle(0, 0, display_get_width(), display_get_height());

The above code will set the game window to occupy the whole display area (either the browser or the screen, depending on the target platform).