Перейти к основному содержимому

Class MinMaxSliderExtensions

Namespace: Aspid.FastTools.UIElements
Assembly: Aspid.FastTools.dll

Provides extension methods for MinMaxSlider.

public static class MinMaxSliderExtensions

Inheritance​

object ← MinMaxSliderExtensions

Methods​

SetHighLimit<T>(T, float)​

Sets highLimit.

public static T SetHighLimit<T>(this T element, float value) where T : MinMaxSlider

Parameters​

element T

The element to modify.

value float

The highest value the selected range can reach.

Returns​

T

The element, for chaining.

Type Parameters​

T

The element type.

Exceptions​

ArgumentException

value is smaller than lowLimit.

SetLowLimit<T>(T, float)​

Sets lowLimit.

public static T SetLowLimit<T>(this T element, float value) where T : MinMaxSlider

Parameters​

element T

The element to modify.

value float

The lowest value the selected range can reach.

Returns​

T

The element, for chaining.

Type Parameters​

T

The element type.

Exceptions​

ArgumentException

value is greater than highLimit.

SetMaxValue<T>(T, float)​

Sets maxValue.

public static T SetMaxValue<T>(this T element, float value) where T : MinMaxSlider

Parameters​

element T

The element to modify.

value float

The upper end of the selected range to set.

Returns​

T

The element, for chaining.

Type Parameters​

T

The element type.

Remarks​

Unity clamps value to the current minValue. To move the range down, call MinMaxSliderExtensions.SetMinValue<T> first or set both ends with INotifyValueChangedExtensions.SetValue<T>.

SetMinValue<T>(T, float)​

Sets minValue.

public static T SetMinValue<T>(this T element, float value) where T : MinMaxSlider

Parameters​

element T

The element to modify.

value float

The lower end of the selected range to set.

Returns​

T

The element, for chaining.

Type Parameters​

T

The element type.

Remarks​

Unity clamps value to the current maxValue: on the default range of 0 to 10, SetMinValue(20).SetMaxValue(30) gives 10 to 30. To move the range up, call MinMaxSliderExtensions.SetMaxValue<T> first or set both ends with INotifyValueChangedExtensions.SetValue<T>.