Class TouchSliderInt
TouchSlider UI element for integer values.
Inheritance
Implements
Inherited Members
Namespace: Unity.AppUI.UI
Assembly: Unity.AppUI.dll
Syntax
public class TouchSliderInt : TouchSlider<int>, IEventHandler, ITransform, ITransitionAnimations, IExperimentalFeatures, IVisualElementScheduler, IResolvedStyle, IContextOverrideElement, IInputElement<int>, IValidatableElement<int>, INotifyValueChanging<int>, INotifyValueChanged<int>
Constructors
TouchSliderInt()
Default constructor.
Declaration
public TouchSliderInt()
Properties
incrementFactor
The increment factor for the slider.
Declaration
public int incrementFactor { get; set; }
Property Value
| Type | Description |
|---|---|
| int |
Methods
Decrement(int)
Method to implement which returns the decrement of a given value.
Declaration
protected override int Decrement(int val)
Parameters
| Type | Name | Description |
|---|---|---|
| int | val | The value to decrement. |
Returns
| Type | Description |
|---|---|
| int | The decremented value. |
Overrides
Increment(int)
Method to implement which returns the increment of a given value.
Declaration
protected override int Increment(int val)
Parameters
| Type | Name | Description |
|---|---|---|
| int | val | The value to increment. |
Returns
| Type | Description |
|---|---|
| int | The incremented value. |
Overrides
ParseRawValueToString(int)
Method to implement to resolve a TValueType value into a string value.
Declaration
protected override string ParseRawValueToString(int val)
Parameters
| Type | Name | Description |
|---|---|---|
| int | val | The TValueType value to convert. |
Returns
| Type | Description |
|---|---|
| string | The converted value. |
Overrides
Remarks
This method is used to convert the value to a string when the user is editing the value in the input field. This must not use the formatString property.
ParseStringToValue(string, out int)
Declaration
protected override bool ParseStringToValue(string strValue, out int val)
Parameters
| Type | Name | Description |
|---|---|---|
| string | strValue | |
| int | val |
Returns
| Type | Description |
|---|---|
| bool |
Overrides
ParseValueToString(int)
Method to implement to resolve a TValueType value into a string value.
You can use ToString() for floating point value types for example.
You can also round the value if you want a specific number of decimals.
Declaration
protected override string ParseValueToString(int val)
Parameters
| Type | Name | Description |
|---|---|---|
| int | val | The TValueType value to convert. |
Returns
| Type | Description |
|---|---|
| string |
Overrides
SliderLerpUnclamped(int, int, float)
Declaration
protected override int SliderLerpUnclamped(int a, int b, float interpolant)
Parameters
| Type | Name | Description |
|---|---|---|
| int | a | |
| int | b | |
| float | interpolant |
Returns
| Type | Description |
|---|---|
| int |
Overrides
SliderNormalizeValue(int, int, int)
Declaration
protected override float SliderNormalizeValue(int currentValue, int lowerValue, int higherValue)
Parameters
| Type | Name | Description |
|---|---|---|
| int | currentValue | |
| int | lowerValue | |
| int | higherValue |
Returns
| Type | Description |
|---|---|
| float |