BackgroundColor
Last updated
Last updated
The BackgroundColor property specifies what the background color will be cleared to every frame. To prevent the background from clearing every frame, set the Alpha of the BackgroundColor to 0. See more information below on this topic.
The following changes the BackgroundColor in response to user input. Add the following to your Screen's CustomActivity:
When a Camera is drawn, the first thing that is done is its DestinationRectangle is painted to the background color. If you have multiple Cameras which overlap and you'd like Cameras which are on top to not write over what's already been drawn by previous Cameras, you can set the BackgroundColor to a color that has an alpha of 0. BackgroundColor for any Cameras except the default one contained in the SpriteManager is transparent. You will need to change the background color if you are making a split-screen game to something no-transparent.
If you would like to draw to the screen before FlatRedBall draws, you can do so, but you must do the following:
Set the Camera's Color's Alpha to 0
Turn off RenderTargets.