Class UnityUiSelectorComponentParameters
Unity-specific parameters for selector UI components that handle option selection from arrays of values.
Extends interactable component parameters to include selection-specific configuration such as selectable values, selected index, and value types.
Implements IUiSelectableParameters interface to provide foundation-agnostic option selection functionality within the Unity UI system.
Implements
Namespace: Serenity.Ui.Infrastructure.Components
Assembly: Serenity.UnityUi.Infrastructure.dll
Syntax
public class UnityUiSelectorComponentParameters : UiInteractableComponentParameters, IUiSelectableParameters, IUiInteractableParameters, IComponentParameters, IFoundationSettings
Constructors
UnityUiSelectorComponentParameters()
Initializes selector component parameters with default configuration.
Creates a selector component with default string value type, zero selected index, and empty selectable values array.
Declaration
public UnityUiSelectorComponentParameters()
UnityUiSelectorComponentParameters(string, int, int, UiComponentValueType, ConfigurationEntry[], string, UiComponentAlignmentType)
Initializes selector component parameters with basic configuration.
Sets up the selector with specified ID, index, selected index, value type, selectable values, label text, and alignment settings.
Declaration
public UnityUiSelectorComponentParameters(string id, int index, int selectedIndex, UiComponentValueType valueType, ConfigurationEntry[] selectableValues, string label, UiComponentAlignmentType alignment)
Parameters
| Type | Name | Description |
|---|---|---|
| string | id | Unique identifier for the selector component |
| int | index | Display order index within the parent container |
| int | selectedIndex | Initial selected index in the selectable values array |
| UiComponentValueType | valueType | Type of values handled by this selector |
| ConfigurationEntry[] | selectableValues | Array of selectable key-value pairs |
| string | label | Display text label for the selector |
| UiComponentAlignmentType | alignment | Text and element alignment configuration |
UnityUiSelectorComponentParameters(string, string, int, int, UiComponentValueType, ConfigurationEntry[], string, UiComponentAlignmentType, IFoundationViewElementFactory, AudioPlayerPlayClip, string, IUiThemeSounds, bool, bool, bool, float)
Initializes selector component parameters with complete dependency injection configuration.
Sets up the selector with full foundation integration including audio services, theme sounds, and view element factories.
Provides comprehensive configuration for selector components within the Serenity foundation architecture.
Declaration
public UnityUiSelectorComponentParameters(string id, string guid, int index, int selectedIndex, UiComponentValueType valueType, ConfigurationEntry[] selectableValues, string label, UiComponentAlignmentType alignment, IFoundationViewElementFactory foundationViewElementFactory, AudioPlayerPlayClip audioPlayerPlayClip, string audioServiceId, IUiThemeSounds themeSounds, bool isTranslatingLabel, bool isTranslatingValue, bool adaptMenuWidth, float adaptMenuWidthPadding)
Parameters
| Type | Name | Description |
|---|---|---|
| string | id | Unique identifier for the selector component |
| string | guid | Globally unique identifier for foundation management |
| int | index | Display order index within the parent container |
| int | selectedIndex | Initial selected index in the selectable values array |
| UiComponentValueType | valueType | Type of values handled by this selector |
| ConfigurationEntry[] | selectableValues | Array of selectable key-value pairs |
| string | label | Display text label for the selector |
| 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 | themeSounds | Theme sound definitions for UI feedback |
| bool | isTranslatingLabel | Whether the label is being translated |
| bool | isTranslatingValue | Whether the value 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
_isTranslatingValue
Declaration
protected bool _isTranslatingValue
Field Value
| Type | Description |
|---|---|
| bool | Whether the value is being translated. |
_selectableValues
Declaration
protected ConfigurationEntry[] _selectableValues
Field Value
| Type | Description |
|---|---|
| ConfigurationEntry[] | The array of selectable key-value pairs available for selection. |
_selectedIndex
Declaration
protected int _selectedIndex
Field Value
| Type | Description |
|---|---|
| int | The currently selected index in the selectable values array. |
_valueType
Declaration
protected UiComponentValueType _valueType
Field Value
| Type | Description |
|---|---|
| UiComponentValueType | The value type for selection validation and formatting. |
Properties
IsTranslatingValue
Declaration
public bool IsTranslatingValue { get; set; }
Property Value
| Type | Description |
|---|---|
| bool |
SelectableValues
Declaration
public ConfigurationEntry[] SelectableValues { get; set; }
Property Value
| Type | Description |
|---|---|
| ConfigurationEntry[] |
SelectedIndex
Declaration
public int SelectedIndex { get; set; }
Property Value
| Type | Description |
|---|---|
| int |
ValueType
Declaration
public UiComponentValueType ValueType { get; set; }
Property Value
| Type | Description |
|---|---|
| UiComponentValueType |