Class BaseSlider<TValueType>
This is a base class for the Slider fields.
Inheritance
BaseSlider<TValueType>
Syntax
public abstract class BaseSlider<TValueType> : BaseField<TValueType>, IEventHandler, ITransform, ITransitionAnimations, IExperimentalFeatures, IVisualElementScheduler, IResolvedStyle, IBindable, INotifyValueChanged<TValueType>, IMixedValueSupport where TValueType : System.IComparable<TValueType>
Type Parameters
Name |
Description |
TValueType |
|
Fields
dragContainerUssClassName
USS class name of container elements in elements of this type.
Declaration
public static readonly string dragContainerUssClassName
Field Value
draggerBorderUssClassName
USS class name of the dragger border element in elements of this type.
Declaration
public static readonly string draggerBorderUssClassName
Field Value
draggerUssClassName
USS class name of dragger elements in elements of this type.
Declaration
public static readonly string draggerUssClassName
Field Value
horizontalVariantUssClassName
USS class name of elements of this type, when they are displayed horizontally.
Declaration
public static readonly string horizontalVariantUssClassName
Field Value
USS class name of input elements in elements of this type.
Declaration
public static readonly string inputUssClassName
Field Value
labelUssClassName
USS class name of labels in elements of this type.
Declaration
public static readonly string labelUssClassName
Field Value
textFieldClassName
USS class name of the text field element in elements of this type.
Declaration
public static readonly string textFieldClassName
Field Value
trackerUssClassName
USS class name of tracker elements in elements of this type.
Declaration
public static readonly string trackerUssClassName
Field Value
ussClassName
USS class name of elements of this type.
Declaration
public static readonly string ussClassName
Field Value
verticalVariantUssClassName
USS class name of elements of this type, when they are displayed vertically.
Declaration
public static readonly string verticalVariantUssClassName
Field Value
Properties
direction
This is the actual property to contain the direction of the slider.
Declaration
public SliderDirection direction { get; set; }
Property Value
highValue
This is the maximum value that the slider encodes.
Declaration
public TValueType highValue { get; set; }
Property Value
Type |
Description |
TValueType |
|
inverted
This indicates whether or not this slider is inverted.
For an inverted horizontal slider, high value is located to the left, low value is located to the right
For an inverted vertical slider, high value is located to the bottom, low value is located to the top.
Declaration
public bool inverted { get; set; }
Property Value
lowValue
This is the minimum value that the slider encodes.
Declaration
public TValueType lowValue { get; set; }
Property Value
Type |
Description |
TValueType |
|
pageSize
This is a generic page size used to change the value when clicking in the slider.
Declaration
public virtual float pageSize { get; set; }
Property Value
range
This is the range from the minimum value to the maximum value of the slider.
Declaration
public TValueType range { get; }
Property Value
Type |
Description |
TValueType |
|
The visibility of the optional field inside the slider control.
Declaration
public virtual bool showInputField { get; set; }
Property Value
value
The actual value of the slider.
Declaration
public override TValueType value { get; set; }
Property Value
Type |
Description |
TValueType |
|
Overrides
UnityEngine.UIElements.BaseField<TValueType>.value
Methods
AdjustDragElement(Single)
Method used to adjust the dragelement. Mainly used in a scroller.
Declaration
public void AdjustDragElement(float factor)
Parameters
Type |
Name |
Description |
Single |
factor |
The factor used to adjust the drag element, where a value > 1 will make it invisible.
|
ExecuteDefaultAction(EventBase)
Declaration
protected override void ExecuteDefaultAction(EventBase evt)
Parameters
Overrides
UnityEngine.UIElements.BaseField<TValueType>.ExecuteDefaultAction(UnityEngine.UIElements.EventBase)
GetClosestPowerOfTen(Single)
Declaration
protected static float GetClosestPowerOfTen(float positiveNumber)
Parameters
Type |
Name |
Description |
Single |
positiveNumber |
|
Returns
RoundToMultipleOf(Single, Single)
Declaration
protected static float RoundToMultipleOf(float value, float roundingValue)
Parameters
Returns
SetValueWithoutNotify(TValueType)
Declaration
public override void SetValueWithoutNotify(TValueType newValue)
Parameters
Type |
Name |
Description |
TValueType |
newValue |
|
Overrides
UnityEngine.UIElements.BaseField<TValueType>.SetValueWithoutNotify(TValueType)
UpdateMixedValueContent()
Declaration
protected override void UpdateMixedValueContent()
Overrides
UnityEngine.UIElements.BaseField<TValueType>.UpdateMixedValueContent()
Extension Methods