/// <summary> /// Draws a progress bar for a ushort property. /// </summary> protected override ushort DrawProgressBar(Rect rect, GUIContent label, ushort value, ProgressBarAttribute attribute, ProgressBarConfig config, string valueLabel) { if (attribute.Segmented) { return((ushort)SirenixEditorFields.SegmentedProgressBarField(rect, label, (long)value, (long)attribute.Min, (long)attribute.Max, config, valueLabel)); } else { return((ushort)SirenixEditorFields.ProgressBarField(rect, label, (double)value, attribute.Min, attribute.Max, config, valueLabel)); } }
/// <summary> /// Draws a progress bar for a decimal property. /// </summary> protected override decimal DrawProgressBar(Rect rect, GUIContent label, double min, double max, ProgressBarConfig config, string valueLabel) { if (this.Attribute.Segmented) { return((decimal)SirenixEditorFields.SegmentedProgressBarField(rect, label, (long)this.ValueEntry.SmartValue, (long)min, (long)max, config, valueLabel)); } else { return((decimal)SirenixEditorFields.ProgressBarField(rect, label, (double)this.ValueEntry.SmartValue, min, max, config, valueLabel)); } }