Description
The Fullscreen
property of the RenderSettings
class in the Sandbox.Engine.Settings
namespace is a boolean value that determines whether the game is displayed in fullscreen mode. When set to true
, the game will occupy the entire screen, providing an immersive experience without window borders or other desktop elements. When set to false
, the game will run in windowed mode, allowing the user to interact with other applications simultaneously.
Usage
To use the Fullscreen
property, you can get or set its value to control the display mode of the game. This property is typically used in conjunction with other display settings such as resolution and borderless mode to configure the game's video output according to user preferences.
After modifying the Fullscreen
property, it is recommended to call the Apply
method to ensure that the changes take effect.
Example
// Example of setting the game to fullscreen mode
RenderSettings settings = new RenderSettings();
settings.Fullscreen = true;
settings.Apply();
// Example of checking if the game is in fullscreen mode
bool isFullscreen = settings.Fullscreen;
if (isFullscreen)
{
// Perform actions specific to fullscreen mode
}