Class TouchSlider<TValueType>
Base class for TouchSlider UI elements (TouchSliderFloat, TouchSliderInt).
Implements
Inherited Members
Namespace: Unity.AppUI.UI
Assembly: Unity.AppUI.dll
Syntax
public abstract class TouchSlider<TValueType> : BaseSlider<TValueType, TValueType>, IEventHandler, ITransform, ITransitionAnimations, IExperimentalFeatures, IVisualElementScheduler, IResolvedStyle, IContextOverrideElement, IInputElement<TValueType>, IValidatableElement<TValueType>, INotifyValueChanging<TValueType>, INotifyValueChanged<TValueType> where TValueType : struct, IComparable, IEquatable<TValueType>
Type Parameters
| Name | Description |
|---|---|
| TValueType | A comparable value type. |
Constructors
TouchSlider()
Default constructor.
Declaration
protected TouchSlider()
Fields
containerUssClassName
The TouchSlider container styling class.
Declaration
public static readonly string containerUssClassName
Field Value
| Type | Description |
|---|---|
| string |
labelUssClassName
The TouchSlider label styling class.
Declaration
public static readonly string labelUssClassName
Field Value
| Type | Description |
|---|---|
| string |
progressUssClassName
The TouchSlider progress styling class.
Declaration
public static readonly string progressUssClassName
Field Value
| Type | Description |
|---|---|
| string |
sizeUssClassName
The TouchSlider size styling class.
Declaration
public static readonly string sizeUssClassName
Field Value
| Type | Description |
|---|---|
| string |
ussClassName
The TouchSlider main styling class.
Declaration
public const string ussClassName = "appui-touchslider"
Field Value
| Type | Description |
|---|---|
| string |
valueUssClassName
The TouchSlider value label styling class.
Declaration
public static readonly string valueUssClassName
Field Value
| Type | Description |
|---|---|
| string |
Properties
label
Specify a unit for the value encapsulated in this slider.
This unit will be displayed next to value into the slider.
Declaration
public string label { get; set; }
Property Value
| Type | Description |
|---|---|
| string |
size
Specify the size of the slider.
Declaration
public Size size { get; set; }
Property Value
| Type | Description |
|---|---|
| Size |
Methods
Clamp(TValueType, TValueType, TValueType)
Utility method to clamp a TValueType value between specified bounds.
Declaration
protected override TValueType Clamp(TValueType v, TValueType lowBound, TValueType highBound)
Parameters
| Type | Name | Description |
|---|---|---|
| TValueType | v | The value to clamp. |
| TValueType | lowBound | Minimum |
| TValueType | highBound | Maximum |
Returns
| Type | Description |
|---|---|
| TValueType | The clamped value. |
Overrides
OnTrackClicked()
Callback when the interactive part of the slider is clicked.
Declaration
protected override void OnTrackClicked()
Overrides
SetValueWithoutNotify(TValueType)
Set the value of the slider without notifying the value change.
Declaration
public override void SetValueWithoutNotify(TValueType newValue)
Parameters
| Type | Name | Description |
|---|---|---|
| TValueType | newValue | The new value to set. |