Pong/Scripts/Data/Settings.cs
Fries 9fdf16c557 add a vsync option to the settings
i added a vsync option to the settings that lets you pick a vsync option that maps to the engines vsync enum. so you can either enable, disable it, turn it to adapt mode, or mailbox mode.
2023-05-26 19:50:14 -07:00

23 lines
656 B
C#

namespace Pong.Scripts.Data;
/// <summary>
/// a structure containing the data of the settings.
/// </summary>
public struct Settings
{
/// <summary>
/// the scale of the game. this can be from 1.0 to 2.0
/// </summary>
public double Scale;
/// <summary>
/// options for VSync. 0 is Disabled, 1 is Enabled, 2 is Adaptive, 3 is Mailbox. These match the <see cref="DisplayServer.VSyncMode"/> enum on
/// the <see cref="DisplayServer"/>.
/// </summary>
public long VSync;
/// <summary>
/// the default values of settings.
/// </summary>
public static Settings Default => new() { Scale = 1.0, VSync = (long)DisplayServer.VSyncMode.Enabled };
}