background_showcolour

This variable determines if the current room's background colour should be drawn.

Syntax:

background_showcolour


Returns: Boolean


Description

When in a room, it can have no background image selected for any of its background_index, in which case you should set a background colour with the background_colour variable and make sure that it is visible by setting this variable is set to true. Having a room with no background image and no background colour will result in graphical artefacts being drawn on the screen and is not recommended.


Example:

if background_index[0] == -1
   {
   background_colour = c_black;
   background_showcolour = true;
   }

The above code checks to see if background0 has an image assigned to it and if not it sets the background colour to black and flags it to be shown.


Back: Backgrounds
Next: background_foreground
© Copyright YoYo Games Ltd. 2018 All Rights Reserved