mirror of
https://gitea.tendokyu.moe/yellowberry/WACCALauncher.git
synced 2026-09-22 14:54:27 +03:00
Added ability to add panel color and console patterns to profiles. Cleaned up a lot of code. Still lots to do before 1.0
39 lines
1.3 KiB
C#
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));
|
|
}
|
|
}
|
|
} |