window_set_max_height

Sets a maximum width for the game window.

Syntax:

GML Code Example

window_set_max_height(height);


Argument Description
height The maximum height in pixels for the game window.


Returns:N/A


Description

This function can be used to set a maximum window height for your game. If you enable the window resize option in the Global Game Settings for the target platform, then the player can resize the game window to any size they wish, however by using this function you can limit the maximum height to the size you specify. If you wish to go back to the default behaviour (ie: no mimimum), then use a value of -1.

NOTE: This function is only available on the Windows, Mac OSX and Linux platforms.


Example:

GML Code Example

window_set_min_width(640);
 window_set_min_height(480);
 window_set_max_width(1280);
 window_set_max_height(960);
 

The above code will set the minimum and maximum width and height for the game window.





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