window_get_colour

Gets the colour of the region inside the window/browser but outside the visible views (default is black).

Syntax:

window_get_colour();


Returns: N/A


Description

This function returns 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:

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.


Back: The Game Window
Next: window_get_fullscreen
© Copyright YoYo Games Ltd. 2018 All Rights Reserved