Class SliderFloat
Slider UI element for floating point values.
Inheritance
SliderFloat
Implements
INotifyValueChanged<float>
Inherited Members
VisualElement.ExecuteDefaultAction(EventBase)
VisualElement.Focus()
VisualElement.Overlaps(Rect)
VisualElement.ToString()
VisualElement.GetFirstOfType<T>()
VisualElement.GetFirstAncestorOfType<T>()
VisualElement.canGrabFocus
VisualElement.focusController
VisualElement.cacheAsBitmap
CallbackEventHandler.RegisterCallback<TEventType>(EventCallback<TEventType>, TrickleDown)
CallbackEventHandler.RegisterCallback<TEventType, TUserArgsType>(EventCallback<TEventType, TUserArgsType>, TUserArgsType, TrickleDown)
CallbackEventHandler.UnregisterCallback<TEventType>(EventCallback<TEventType>, TrickleDown)
CallbackEventHandler.UnregisterCallback<TEventType, TUserArgsType>(EventCallback<TEventType, TUserArgsType>, TrickleDown)
Namespace: Unity.AppUI.UI
Assembly: Unity.AppUI.dll
Syntax
public class SliderFloat : SliderBase<float>, IEventHandler, ITransform, ITransitionAnimations, IExperimentalFeatures, IVisualElementScheduler, IResolvedStyle, IContextOverrideElement, IAdditionalDataHolder, IInputElement<float>, IValidatableElement<float>, INotifyValueChanging<float>, INotifyValueChanged<float>
Constructors
SliderFloat()
Default constructor.
Declaration
public SliderFloat()
Properties
incrementFactor
The increment factor used when the slider is interacted with using the keyboard.
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
ParseStringToValue(string, out float)
Declaration
protected override bool ParseStringToValue(string strValue, out float v)
Parameters
Type | Name | Description |
---|---|---|
string | strValue | |
float | v |
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 | The converted value. |
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 |
Overrides
Implements
UnityEngine.UIElements.INotifyValueChanged<T>