window_set_fullscreen

Sets whether the game is run in fullscreen or not.

Syntax:

GML Code Example

window_set_fullscreen(full);


Argument Description
full Whether to set the screen to fullscreen (true) or not (false).


Returns: N/A


Description

With this function you can set the game window to be full screen (true) or not (false). Please note that for the Mac OSX target, you must have the "Start In Fullscreen" option selected in the Global Game Settings, otherwise this function will fail.


Example:

GML Code Example

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.





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