sledgemapper/Sledgemapper/Settings.cs
Michele Scandura 7e3e645fc9
All checks were successful
continuous-integration/drone/push Build is passing
fixes and cleanup
2021-09-21 11:09:26 +01:00

53 lines
1.3 KiB
C#

using System;
using Microsoft.Xna.Framework;
using Sentry;
namespace Sledgemapper
{
public class Settings
{
public Color BackgroundColor { get; set; }
public Color OverlayTintColor { get; set; }
public Color GridColor { get; set; }
public Color NoteColor { get; set; }
public string MachineName { get; set; }
public int TileDeleteDivider { get; set; }
public int PingDuration {get;set;}
private static readonly Settings instance = new ();
// Explicit static constructor to tell C# compiler
// not to mark type as beforefieldinit
static Settings()
{
}
private Settings()
{
BackgroundColor = Color.LightGray;
GridColor = Color.Black;
NoteColor = Color.DarkRed;
OverlayTintColor = new Color(24, 118, 157);
TileDeleteDivider = 14;
PingDuration = 4000;
try
{
MachineName = Environment.MachineName;
}
catch (Exception ex)
{
SentrySdk.CaptureException(ex);
MachineName = "n/a";
}
}
public static Settings Instance
{
get
{
return instance;
}
}
}
}