Inheritance: System.Attribute
示例#1
0
 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);
 }
示例#2
0
        public static bool HDRColor(FieldInfo field)
        {
            HDRAttribute attr = field.GetCustomAttribute <HDRAttribute>();

            if (attr != null)
            {
                return(attr.HDR);
            }
            else
            {
                return(false);
            }
        }