using System.Collections.Generic; using AcDream.UI.Abstractions.Settings; namespace AcDream.UI.Abstractions.Panels.Settings; /// /// Particle visibility distance policy. Retail uses the GfxObj-authored /// distance exactly; Extended is an explicit acdream adaptation for players /// who prefer longer-lived distant effects with the corresponding CPU cost. /// public enum ParticleRange { Retail = 0, Extended = 1, } /// /// Display-related preferences persisted to settings.json. /// Modern addition (no retail equivalent for FOV / vsync etc) — replaces /// the various ACDREAM_* environment variables for resolution + /// windowed mode with an in-game UI. /// /// /// Records are immutable; mutation goes through /// which assigns a new instance via /// with-expressions. /// /// public sealed record DisplaySettings( string Resolution, bool Fullscreen, bool VSync, float FieldOfView, float Gamma, bool ShowFps, QualityPreset Quality, ParticleRange ParticleRange) { /// Values used on first launch / when settings.json is absent. /// Geometry/render defaults preserve the pre-L.0 runtime state — Resolution /// matches the WindowOptions startup size (1280×720), FieldOfView /// matches camera FovY (60°), VSync matches WindowOptions (false), /// ShowFps matches retail's initially-hidden SmartBox FPS readout. public static DisplaySettings Default { get; } = new( Resolution: "1280x720", Fullscreen: false, VSync: false, FieldOfView: 60f, Gamma: 1.0f, ShowFps: false, Quality: QualityPreset.High, ParticleRange: ParticleRange.Retail); /// 16:9 resolution presets offered in the dropdown. public static IReadOnlyList AvailableResolutions { get; } = new[] { "1280x720", "1366x768", "1600x900", "1920x1080", "2560x1440", "3840x2160", }; }