Files @ 70b1de28b2a2
Branch filter:

Location: ATITD-Tools/Desert-Paint-Codex/Converters/NotEnumBooleanConverter.cs

Jason Maltzen
Re-enable the ability to save debug screenshots based on a setting value to help debug reaction capturing. Update the README to correctly reflect the debug.screenshot setting name, location of the settings file, and removal of the old debug menu.
using System;

namespace DesertPaintCodex.Converters
{
    public class NotEnumBooleanConverter
    {
        public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
        {
            if (value is not Enum en) return false;
            
            string? parameterString = parameter.ToString();
            if (parameterString == null) return false;
            
            object parameterValue = Enum.Parse(value.GetType(), parameterString);
            return !parameterValue.Equals(value);
        }

        public object ConvertBack(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
        {
            throw new InvalidOperationException("NotEnumBooleanoConverter can only be used OneWay.");
        }
    }
}