Class UnityUiInputComponentParameters
Unity-specific parameters for input UI components that handle text entry and editing.
Extends interactable component parameters to include input-specific configuration such as value types, character limits, and selectable values.
Implements IUiEditableParameters interface to provide foundation-agnostic text input functionality within the Unity UI system.
Namespace: Serenity.Ui.Infrastructure.Components
Assembly: Serenity.UnityUi.Infrastructure.dll
Syntax
public class UnityUiInputComponentParameters : UiInteractableComponentParameters, IUiEditableParameters, IComponentParameters, IFoundationSettings
Constructors
UnityUiInputComponentParameters()
Initializes input component parameters with default configuration.
Creates an input component with default string value type and base parameter initialization.
Declaration
public UnityUiInputComponentParameters()
UnityUiInputComponentParameters(string, int, UiComponentValueType, string, UiComponentAlignmentType)
Initializes input component parameters with basic configuration.
Sets up the input field with specified ID, index, value type, label text, and alignment settings.
Declaration
public UnityUiInputComponentParameters(string id, int index, UiComponentValueType valueType, string label, UiComponentAlignmentType alignment)
Parameters
| Type | Name | Description |
|---|---|---|
| string | id | Unique identifier for the input component |
| int | index | Display order index within the parent container |
| UiComponentValueType | valueType | Type of values this input field accepts |
| string | label | Display text label for the input field |
| UiComponentAlignmentType | alignment | Text and element alignment configuration |
UnityUiInputComponentParameters(string, string, int, string, string, int, UiComponentAlignmentType, IFoundationViewElementFactory, AudioPlayerPlayClip, string, IUiThemeSounds, bool, bool, float)
Initializes input component parameters with complete dependency injection configuration.
Sets up the input field with full foundation integration including audio services, theme sounds, and view element factories.
Provides comprehensive configuration for input components within the Serenity foundation architecture.
Declaration
public UnityUiInputComponentParameters(string id, string guid, int index, string label, string value, int maxLength, UiComponentAlignmentType alignment, IFoundationViewElementFactory foundationViewElementFactory, AudioPlayerPlayClip audioPlayerPlayClip, string audioServiceId, IUiThemeSounds themeSounds, bool isTranslatingLabel, bool adaptMenuWidth, float adaptMenuWidthPadding)
Parameters
| Type | Name | Description |
|---|---|---|
| string | id | Unique identifier for the input component |
| string | guid | Globally unique identifier for foundation management |
| int | index | Display order index within the parent container |
| string | label | Display text label for the input field |
| string | value | Initial text value of the input field |
| int | maxLength | Maximum character limit for text input |
| 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 | adaptMenuWidth | Whether to adapt selector width to text content |
| float | adaptMenuWidthPadding | Padding to apply when adapting selector width to text content |
Fields
_maxLength
Declaration
protected int _maxLength
Field Value
| Type | Description |
|---|---|
| int | The maximum character limit for text input |
_selectableValues
Declaration
protected ConfigurationEntry[] _selectableValues
Field Value
| Type | Description |
|---|---|
| ConfigurationEntry[] | The array of selectable values for constrained input options |
_value
Declaration
protected string _value
Field Value
| Type | Description |
|---|---|
| string | The current text value of the input field |
_valueType
Declaration
protected UiComponentValueType _valueType
Field Value
| Type | Description |
|---|---|
| UiComponentValueType | The value type for input validation and formatting |
Properties
MaxLength
Gets or sets the maximum character limit for text input.
Controls how many characters can be entered into the input field.
Declaration
public int MaxLength { get; set; }
Property Value
| Type | Description |
|---|---|
| int | The maximum character limit for text input |
SelectableValues
Gets or sets the array of selectable values for constrained input options.
Provides predefined options that can be selected or used for validation.
Declaration
public ConfigurationEntry[] SelectableValues { get; set; }
Property Value
| Type | Description |
|---|---|
| ConfigurationEntry[] | The array of selectable values |
Value
Gets or sets the current text value of the input field.
Represents the actual text content displayed and edited in the input component.
Declaration
public string Value { get; set; }
Property Value
| Type | Description |
|---|---|
| string | The current text value of the input field |
ValueType
Gets or sets the value type for input validation and formatting.
Determines how the input text should be parsed and validated (STRING, INT, FLOAT).
Declaration
public UiComponentValueType ValueType { get; set; }
Property Value
| Type | Description |
|---|---|
| UiComponentValueType | The value type for input validation and formatting |