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, IAdditionalDataHolder, 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
labelUssClassName
The TouchSlider label styling class.
Declaration
public const string labelUssClassName = "appui-touchslider__label"
Field Value
Type | Description |
---|---|
string |
progressUssClassName
The TouchSlider progress styling class.
Declaration
public const string progressUssClassName = "appui-touchslider__progress"
Field Value
Type | Description |
---|---|
string |
sizeUssClassName
The TouchSlider size styling class.
Declaration
public const string sizeUssClassName = "appui-touchslider--size-"
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 const string valueUssClassName = "appui-touchslider__valuelabel"
Field Value
Type | Description |
---|---|
string |
Properties
contentContainer
The content container of this element.
Declaration
public override VisualElement contentContainer { get; }
Property Value
Type | Description |
---|---|
VisualElement |
Overrides
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
GetSizeUssClassName(Size)
Declaration
public static string GetSizeUssClassName(Size enumValue)
Parameters
Type | Name | Description |
---|---|---|
Size | enumValue |
Returns
Type | Description |
---|---|
string |
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. |