Files
crysome/Crysome.Server/Crysome.Server.Converters/InventoryPresentToOpacityConverter.cs
2026-08-27 11:22:54 -06:00

30 lines
640 B
C#

using System;
using System.Globalization;
using System.Windows.Data;
namespace Crysome.Server.Converters;
public class InventoryPresentToOpacityConverter : IValueConverter
{
public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
{
bool flag = default(bool);
int num;
if (value is bool)
{
flag = (bool)value;
num = 1;
}
else
{
num = 0;
}
return (((uint)num & (flag ? 1u : 0u)) != 0) ? 1.0 : 0.3;
}
public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
{
throw new NotImplementedException();
}
}