public ColorSetting(Color value, FieldInfo field, string group)
     : base(field, SettingType.Color, group)
 {
     Value = value;
     HDR   = HDRAttribute.HDRColor(field);
     MinValueAttribute.GetMinValue(field, ref MinValue);
     MaxValueAttribute.GetMaxValue(field, ref MaxValue);
     StepSizeAttribute.GetStepSize(field, ref StepSize);
     Units = ColorUnitAttribute.GetColorUnit(field);
 }
Exemplo n.º 2
0
        public static ColorUnit GetColorUnit(FieldInfo field)
        {
            ColorUnitAttribute attr = field.GetCustomAttribute <ColorUnitAttribute>();

            if (attr != null)
            {
                return(attr.Unit);
            }
            else
            {
                return(ColorUnit.None);
            }
        }