Class UnityUiSliderComponentParameters
Unity-specific parameters for slider UI components that handle range-based numeric value selection.
Extends interactable component parameters to include slider-specific configuration such as current value, minimum/maximum bounds, and value types.
Implements IUiSlideableParameters interface to provide foundation-agnostic range control functionality within the Unity UI system.
Implements
Namespace: Serenity.Ui.Infrastructure.Components
Assembly: Serenity.UnityUi.Infrastructure.dll
Syntax
public class UnityUiSliderComponentParameters : UiInteractableComponentParameters, IUiSlideableParameters, IUiInteractableParameters, IComponentParameters, IFoundationSettings
Constructors
UnityUiSliderComponentParameters()
Initializes slider component parameters with default configuration.
Creates a slider component with default zero value and base parameter initialization.
Declaration
public UnityUiSliderComponentParameters()
UnityUiSliderComponentParameters(string, int, float, float, float, UiComponentValueType, string, UiComponentAlignmentType)
Initializes slider component parameters with basic range configuration.
Sets up the slider with specified ID, index, value bounds, value type, label text, and alignment settings.
Declaration
public UnityUiSliderComponentParameters(string id, int index, float value, float minValue, float maxValue, UiComponentValueType valueType, string label, UiComponentAlignmentType alignment)
Parameters
| Type | Name | Description |
|---|---|---|
| string | id | Unique identifier for the slider component |
| int | index | Display order index within the parent container |
| float | value | Initial slider value within the defined range |
| float | minValue | Minimum allowed value for the slider |
| float | maxValue | Maximum allowed value for the slider |
| UiComponentValueType | valueType | Value type determining precision behavior |
| string | label | Display text label for the slider |
| UiComponentAlignmentType | alignment | Text and element alignment configuration |
UnityUiSliderComponentParameters(string, string, int, float, float, float, UiComponentValueType, string, UiComponentAlignmentType, IFoundationViewElementFactory, AudioPlayerPlayClip, string, IUiThemeSounds, bool, bool, float)
Initializes slider component parameters with complete dependency injection configuration.
Sets up the slider with full foundation integration including audio services, theme sounds, and view element factories.
Provides comprehensive configuration for slider components within the Serenity foundation architecture.
Declaration
public UnityUiSliderComponentParameters(string id, string guid, int index, float value, float minValue, float maxValue, UiComponentValueType valueType, string label, UiComponentAlignmentType alignment, IFoundationViewElementFactory foundationViewElementFactory, AudioPlayerPlayClip audioPlayerPlayClip, string audioServiceId, IUiThemeSounds uiThemeSounds, bool isTranslatingLabel, bool adaptMenuWidth, float adaptMenuWidthPadding)
Parameters
| Type | Name | Description |
|---|---|---|
| string | id | Unique identifier for the slider component |
| string | guid | Globally unique identifier for foundation management |
| int | index | Display order index within the parent container |
| float | value | Initial slider value within the defined range |
| float | minValue | Minimum allowed value for the slider |
| float | maxValue | Maximum allowed value for the slider |
| UiComponentValueType | valueType | Value type determining precision behavior |
| string | label | Display text label for the slider |
| UiComponentAlignmentType | alignment | Text and element alignment configuration |
| IFoundationViewElementFactory | foundationViewElementFactory | Factory for creating foundation view elements |
| AudioPlayerPlayClip | audioPlayerPlayClip | Audio playback delegate for sound effects |
| string | audioServiceId | Audio service identifier for sound playback |
| IUiThemeSounds | uiThemeSounds | Theme sound definitions for UI feedback |
| bool | isTranslatingLabel | Whether the label is being translated |
| bool | adaptMenuWidth | Whether to adapt selector width to text content |
| float | adaptMenuWidthPadding | Padding to apply when adapting selector width to text content |
Fields
_maxValue
Declaration
protected float _maxValue
Field Value
| Type | Description |
|---|---|
| float | The maximum allowed value for the slider range. |
_minValue
Declaration
protected float _minValue
Field Value
| Type | Description |
|---|---|
| float | The minimum allowed value for the slider range. |
_value
Declaration
protected float _value
Field Value
| Type | Description |
|---|---|
| float | The current numeric value of the slider within its defined range. |
_valueType
Declaration
protected UiComponentValueType _valueType
Field Value
| Type | Description |
|---|---|
| UiComponentValueType | The value type for slider precision and formatting. |
Properties
MaxValue
Gets or sets the maximum value bound for the slider range.
Defines the upper limit for slider value selection.
Declaration
public float MaxValue { get; set; }
Property Value
| Type | Description |
|---|---|
| float | The maximum value bound |
MinValue
Gets or sets the minimum value bound for the slider range.
Defines the lower limit for slider value selection.
Declaration
public float MinValue { get; set; }
Property Value
| Type | Description |
|---|---|
| float | The minimum value bound |
Value
Gets or sets the current value of the slider component.
Controls the slider's position within its defined range.
Declaration
public float Value { get; set; }
Property Value
| Type | Description |
|---|---|
| float | The current slider value |
ValueType
Gets or sets the value type for slider behavior configuration.
Determines precision handling and display formatting for the slider values.
Declaration
public UiComponentValueType ValueType { get; set; }
Property Value
| Type | Description |
|---|---|
| UiComponentValueType | The slider value type |