Files
mrgameeng/src/MrGameEng.Core/GameHostOptions.cs
T

35 lines
1.2 KiB
C#

using Microsoft.Xna.Framework;
namespace MrGameEng.Core;
/// <summary>Window and loop settings for <see cref="GameHost"/>.</summary>
public sealed class GameHostOptions
{
/// <summary>Window title.</summary>
public string Title { get; set; } = "MrGameEng";
/// <summary>Backbuffer width in pixels.</summary>
public int Width { get; set; } = 1280;
/// <summary>Backbuffer height in pixels.</summary>
public int Height { get; set; } = 720;
/// <summary>Borderless fullscreen instead of a window.</summary>
public bool Fullscreen { get; set; }
/// <summary>Synchronize presentation with the display's vertical retrace.</summary>
public bool VSync { get; set; } = true;
/// <summary>Run updates on a fixed timestep (<see cref="TargetFps"/>) instead of as fast as possible.</summary>
public bool FixedTimeStep { get; set; }
/// <summary>Target update rate when <see cref="FixedTimeStep"/> is enabled.</summary>
public int TargetFps { get; set; } = 60;
/// <summary>Color the backbuffer is cleared to each frame.</summary>
public Color ClearColor { get; set; } = Color.CornflowerBlue;
/// <summary>Allow the user to resize the window.</summary>
public bool AllowResizing { get; set; } = true;
}