public FloatSetting(float value, FieldInfo field, string group) : base(field, SettingType.Float, group) { Value = value; MinValueAttribute.GetMinValue(field, ref MinValue); MaxValueAttribute.GetMaxValue(field, ref MaxValue); StepSizeAttribute.GetStepSize(field, ref StepSize); }
public static void GetStepSize(FieldInfo field, ref int stepSize) { StepSizeAttribute attr = field.GetCustomAttribute <StepSizeAttribute>(); if (attr != null) { stepSize = attr.StepSizeInt; } }
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); }
public FloatSetting(float value, FieldInfo field, string group) : base(field, SettingType.Float, group) { Value = value; MinValueAttribute.GetMinValue(field, ref MinValue); MaxValueAttribute.GetMaxValue(field, ref MaxValue); StepSizeAttribute.GetStepSize(field, ref StepSize); ConvertMode = ConversionModeAttribute.GetConversionMode(field); ConversionScale = ConversionScaleAttribute.GetConversionScale(field); }