Files
Zsolt Zitting dd7c2f2abe Add new IO4 code via LilyConsole, add game kill bind, QOL changes, etc.
Added ability to add panel color and console patterns to profiles.
Cleaned up a lot of code. Still lots to do before 1.0
2026-09-19 05:24:16 -07:00

39 lines
1.3 KiB
C#

using Newtonsoft.Json;
using System.IO;
namespace WACCALauncher
{
// TODO: implement themes
public enum LauncherTheme
{
Dark
}
[JsonObject]
public class LauncherSettings
{
[JsonProperty] public string DefaultProfile { get; set; } = string.Empty;
[JsonProperty] public bool UseWatchdog { get; set; } = true;
[JsonProperty] public LauncherTheme Theme { get; set; } = LauncherTheme.Dark;
[JsonProperty] public bool StrictMode { get; set; } = true;
[JsonProperty] public string ProfileDir { get; set; } = "_profiles";
[JsonProperty] public bool DisableIO4 { get; set; } = false;
[JsonProperty] public bool LegacyIO4 { get; set; } = false;
[JsonProperty] public bool DisableLights { get; set; } = false;
[JsonProperty] public bool DisableGameKill { get; set; } = false;
public static LauncherSettings Load()
{
return JsonConvert.DeserializeObject<LauncherSettings>(File.ReadAllText("launcher.json"));
}
public static void Save(LauncherSettings settings)
{
if (settings == null) settings = new LauncherSettings();
File.WriteAllText("launcher.json", JsonConvert.SerializeObject(settings, Formatting.Indented));
}
}
}