window_set_colour

Sets the colour of the region inside the game window but outside the visible views (default is black).

Syntax:

GML Code Example

window_set_colour(colour);


Argument Description
colour The colour to set the region.


Returns:N/A


Description

This function can set the background colour of the game window. This colour represents that which will be used for those areas of the game window that are not occupied by any views. The following image illustrates this:

The above image has two views with two view ports, each one drawn at different positions. This stretches the game window to accommodate both ports and uses the window colour to colour the background where no view is shown.


Example:

GML Code Example

if window_get_colour() != c_black
    {
    window_set_colour(c_black);
    }
 

The above code will check the window colour to see if it is set as black or not, and if it is not it sets it to black.





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