Class SliderInt
Slider UI element for integer values.
Inheritance
SliderInt
Implements
INotifyValueChanged<int>
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: solution.dll
Syntax
public class SliderInt : SliderBase<int>, IEventHandler, ITransform, ITransitionAnimations, IExperimentalFeatures, IVisualElementScheduler, IResolvedStyle, IContextOverrideElement, IInputElement<int>, IValidatableElement<int>, INotifyValueChanging<int>, INotifyValueChanged<int>
Constructors
SliderInt()
Default constructor.
Declaration
public SliderInt()
Properties
incrementFactor
The increment factor used when the slider is interacted with using the keyboard.
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
ParseStringToValue(string, out int)
Declaration
protected override bool ParseStringToValue(string strValue, out int v)
Parameters
Type | Name | Description |
---|---|---|
string | strValue | |
int | v |
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 |
Overrides
Implements
UnityEngine.UIElements.INotifyValueChanged<T>