Files
@ 334157513064
Branch filter:
Location: ATITD-Tools/Desert-Paint-Lab/AppSettings.cs - annotation
334157513064
1.2 KiB
text/x-csharp
Change IsRed / IsGreen / IsBlue tests to be a little more tolerant of brighter pixels - was not detecting green clipped high correctly with the new brighter background texture.
5d0a31247a93 5d0a31247a93 5d0a31247a93 5d0a31247a93 5d0a31247a93 5d0a31247a93 5d0a31247a93 5d0a31247a93 5d0a31247a93 5d0a31247a93 5d0a31247a93 5d0a31247a93 f1323ba34306 5d0a31247a93 f1323ba34306 f1323ba34306 f1323ba34306 f1323ba34306 5d0a31247a93 f1323ba34306 5d0a31247a93 f1323ba34306 f1323ba34306 f1323ba34306 f1323ba34306 5d0a31247a93 5d0a31247a93 5d0a31247a93 5d0a31247a93 5d0a31247a93 5d0a31247a93 5d0a31247a93 5d0a31247a93 5d0a31247a93 5d0a31247a93 5d0a31247a93 5d0a31247a93 5d0a31247a93 5d0a31247a93 5d0a31247a93 f1323ba34306 5d0a31247a93 5d0a31247a93 5d0a31247a93 5d0a31247a93 5d0a31247a93 5d0a31247a93 5d0a31247a93 5d0a31247a93 | using System;
namespace DesertPaintLab
{
public class AppSettings
{
private AppSettings()
{
}
private static Settings _settings = new Settings();
public static void Get(string key, out int value, int defaultValue)
{
if (!_settings.TryGet(key, out value))
{
value = defaultValue;
}
}
public static void Get(string key, out bool value, bool defaultValue)
{
if (!_settings.TryGet(key, out value))
{
value = defaultValue;
}
}
public static void Set(string key, int value)
{
_settings.Set(key, value);
}
public static void Set(string key, bool value)
{
_settings.Set(key, value);
}
public static void Save()
{
string settingsPath = System.IO.Path.Combine(FileUtils.AppDataPath, "settings");
_settings.Save(settingsPath);
}
public static bool Load()
{
string settingsPath = System.IO.Path.Combine(FileUtils.AppDataPath, "settings");
return _settings.Load(settingsPath);
}
}
}
|