Files @ be9989c2c66e
Branch filter:

Location: ATITD-Tools/Desert-Paint-Lab/AppSettings.cs

Jason Maltzen
Reduce the amount of debug output. Fix a crash when a potential window candidate is detected on the top row of the screen (which isn't possible). Break out of screen region tests early when the frame isn't detected to reduce how long a scan takes.
using System;

namespace DesertPaintLab
{
    public class AppSettings
    {
        private AppSettings()
        {
        }

        private static Settings _settings = new Settings();

        public static void Get(string key, out int value)
        {
            _settings.Get(key, out value);
        }
        public static void Get(string key, out bool value)
        {
            _settings.Get(key, out value);
        }
        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);
        }
    }
}