private int DrawCacheSize(int value, GUIContent label) { value /= 1000; value = SirenixEditorFields.DelayedIntField("Max Cache Size", value); value = value < 1 ? 1 : value > 10000 ? 10000 : value; return(value * 1000); }
/// <summary> /// Draws the property. /// </summary> protected override void DrawPropertyLayout(GUIContent label) { int value = SirenixEditorFields.DelayedIntField(label, this.ValueEntry.SmartValue, GUILayoutOptions.MinWidth(0)); if (value < byte.MinValue) { value = byte.MinValue; } else if (value > byte.MaxValue) { value = byte.MaxValue; } this.ValueEntry.SmartValue = (byte)value; }
/// <summary> /// Draws the property. /// </summary> protected override void DrawPropertyLayout(IPropertyValueEntry <byte> entry, DelayedAttribute attribute, GUIContent label) { int value = SirenixEditorFields.DelayedIntField(label, entry.SmartValue); if (value < byte.MinValue) { value = byte.MinValue; } else if (value > byte.MaxValue) { value = byte.MaxValue; } entry.SmartValue = (byte)value; }
/// <summary> /// Draws the property. /// </summary> protected override void DrawPropertyLayout(GUIContent label) { this.ValueEntry.SmartValue = SirenixEditorFields.DelayedIntField(label, this.ValueEntry.SmartValue, GUILayoutOptions.MinWidth(0)); }
/// <summary> /// Draws the property. /// </summary> protected override void DrawPropertyLayout(IPropertyValueEntry <int> entry, DelayedAttribute attribute, GUIContent label) { entry.SmartValue = SirenixEditorFields.DelayedIntField(label, entry.SmartValue); }