Class TouchSliderFloat
TouchSlider UI element for floating point values.
Inheritance
Implements
Inherited Members
Namespace: Unity.AppUI.UI
Assembly: solution.dll
Syntax
public class TouchSliderFloat : TouchSlider<float>, IEventHandler, ITransform, ITransitionAnimations, IExperimentalFeatures, IVisualElementScheduler, IResolvedStyle, IContextOverrideElement, IInputElement<float>, IValidatableElement<float>, INotifyValueChanging<float>, INotifyValueChanged<float>
Constructors
TouchSliderFloat()
Default constructor.
Declaration
public TouchSliderFloat()
Properties
incrementFactor
The increment factor for the slider.
Declaration
public float incrementFactor { get; set; }
Property Value
Type | Description |
---|---|
float |
Methods
Decrement(float)
Method to implement which returns the decrement of a given value.
Declaration
protected override float Decrement(float val)
Parameters
Type | Name | Description |
---|---|---|
float | val | The value to decrement. |
Returns
Type | Description |
---|---|
float | The decremented value. |
Overrides
Increment(float)
Method to implement which returns the increment of a given value.
Declaration
protected override float Increment(float val)
Parameters
Type | Name | Description |
---|---|---|
float | val | The value to increment. |
Returns
Type | Description |
---|---|
float | The incremented value. |
Overrides
ParseRawValueToString(float)
Method to implement to resolve a TValueType value into a string value.
Declaration
protected override string ParseRawValueToString(float val)
Parameters
Type | Name | Description |
---|---|---|
float | 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 float)
Declaration
protected override bool ParseStringToValue(string strValue, out float val)
Parameters
Type | Name | Description |
---|---|---|
string | strValue | |
float | val |
Returns
Type | Description |
---|---|
bool |
Overrides
ParseValueToString(float)
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(float val)
Parameters
Type | Name | Description |
---|---|---|
float | val | The TValueType value to convert. |
Returns
Type | Description |
---|---|
string |
Overrides
SliderLerpUnclamped(float, float, float)
Declaration
protected override float SliderLerpUnclamped(float a, float b, float interpolant)
Parameters
Type | Name | Description |
---|---|---|
float | a | |
float | b | |
float | interpolant |
Returns
Type | Description |
---|---|
float |
Overrides
SliderNormalizeValue(float, float, float)
Declaration
protected override float SliderNormalizeValue(float currentValue, float lowerValue, float higherValue)
Parameters
Type | Name | Description |
---|---|---|
float | currentValue | |
float | lowerValue | |
float | higherValue |
Returns
Type | Description |
---|---|
float |