Sets the position and size of the window rectangle.


GML Code Example

window_set_rectangle(x, y, w, h);

Argument Description
x The new x coordinate of the window.
y The new y coordinate of the window.
w The new width of the window.
h The new height of the window.



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.


GML Code 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).

No Examples Submitted

Does this page need better examples? Be the first to Submit

No Edits Suggested

Is this page unclear or not descriptive enough? Suggest an edit to the page and with enough upvotes your changes will be made.

No Questions Have Been Ask

Do you have a question about this page? Ask it Here