With this function you can set the game window to be full screen (true) or not (false). Please note that for the macOS target, you must have unchecked the "Start In Fullscreen" option and checked the "Allow the player to resize the game window" option in the Game Options, otherwise this function will fail. Also note that this function will not work on HTML5 unless it's added in as a "clickable" callback (see here for more details).
window_set_fullscreen(full);
Argument | Type | Description |
---|---|---|
full | Boolean | Whether to set the screen to fullscreen (true) or not (false). |
N/A
if mouse_check_button_pressed(mb_left)
{
if window_get_fullscreen()
{
window_set_fullscreen(false);
}
else
{
window_set_fullscreen(true);
}
}
The above code checks for a mouse button press and then sets the window to fullscreen if it is not already, or sets it to windowed if it is already.