❇️ Added Settings classes to save and load local configurations

This commit is contained in:
2025-11-21 20:33:52 +01:00
parent 2947011a1a
commit ce29711614
9 changed files with 250 additions and 2 deletions
@@ -0,0 +1,31 @@
namespace Babushka.scripts.CSharp.Common.Savegame;
/// <summary>
/// Data structure for device-specific settings that should be saved / loaded to disk.
/// Will not be synced across devices.
/// </summary>
public class SettingsData
{
/// <summary>
/// To be incremented (and migrated) on modification.
/// </summary>
public const int VERSION = 1;
public int version { get; set; } = VERSION;
public bool IsVersionValid()
{
return VERSION == version;
}
public double runtimeSeconds { get; set; }
public int windowSizeX { get; set; } = 800;
public int windowSizeY { get; set; } = 600;
public int windowPositionX { get; set; } = 100;
public int windowPositionY { get; set; } = 100;
public bool windowBorderless { get; set; }
public float volumeMaster { get; set; } = 1.0f;
public float volumeFx { get; set; } = 1.0f;
public float volumeMusic { get; set; } = 1.0f;
}