Namespace Serenity.Ui.Infrastructure.Components
Classes
CustomTMPDropdown
Custom TextMeshPro dropdown component that extends TMP_Dropdown with hover selection functionality.
Automatically selects dropdown items when the mouse pointer enters them and provides events for dropdown visibility changes.
Enhances the standard Unity dropdown with improved user interaction and event notification capabilities.
CustomTMPDropdown.DropdownShownEvent
Serializable UnityEvent that is invoked when the dropdown list is shown to the user.
Can be used to trigger additional UI effects or sound feedback when the dropdown opens.
Allows Unity Inspector configuration and runtime subscription for dropdown visibility events.
CustomToggle
Extended Toggle that synchronizes an additional GameObject's active state with the toggle's isOn value. The GameObject is enabled when isOn is true, and disabled when isOn is false. Updates occur at the same moment the base Toggle updates its own graphic visibility.
UnityUiBackgroundComponent
Unity-specific background UI component used for decorative menu backgrounds.
Inherits from UnityUiComponent but is non-interactive: it does not participate in navigation or input.
Holds references to the main background image and optional decorative elements that can be adapted to a layout area.
UnityUiBackgroundComponentActions
Unity UI background component actions that handle generic lifecycle and focus-related callbacks.
Unlike interactable components, background components do not expose submit/toggle/value-change events.
Extends UiComponentActions to allow optional Awake/OnEnable/Update/OnDisable/OnDestroy hooks if needed.
UnityUiBackgroundComponentParameters
Unity-specific parameters for background UI components.
Inherits from UiInteractableComponentParameters just to reuse the standard fields
(Id, Guid, Index, FoundationViewElementFactory, etc.) required by IUiComponentParameters.
Background components ignore interactive-specific fields but can still benefit from common metadata.
UnityUiComponent
Abstract base class for all Unity-specific UI components in the Serenity foundation.
Extends the foundation-agnostic FoundationUiComponent to provide Unity-specific functionality including Animator integration and enhanced component lookup mechanisms.
Implements the Infrastructure layer pattern by bridging between domain interfaces and Unity's GameObject system.
UnityUiDropdownComponent
Unity UI dropdown component that provides expandable list selection functionality with keyboard and mouse navigation.
Extends selector component to handle dropdown-specific behaviors including list expansion, option navigation, and selection confirmation.
Implements IUiCancellable and IUiSubmittable interfaces for comprehensive dropdown interaction management within the Unity UI system.
UnityUiDropdownComponentActions
Unity UI dropdown component actions that handle expandable list interactions and cancellation events.
Extends selector component actions to provide dropdown-specific callback functionality including submission and cancellation behaviors.
Implements IUiSubmittableActions and IUiCancellableActions interfaces for complete dropdown interaction handling within the UI system.
UnityUiDropdownComponentParameters
Unity-specific parameters for dropdown UI components that handle expandable option selection.
Extends selector component parameters to provide dropdown-specific configuration for expandable list navigation.
Inherits all selector functionality while maintaining dropdown-specific behavior characteristics within the Unity UI system.
UnityUiHighlightImage
Data class that caches highlight image properties for efficient width adaptation calculations.
Stores base dimensions, position, and offsets computed during initial layout evaluation.
UnityUiInputComponent
Unity UI input component that provides text editing functionality with cancel and submit capabilities.
Manages input field editing states, character limits, and validation while integrating with the Serenity UI system.
Implements IUiEditable and IUiCancellable interfaces for comprehensive text input management.
CORE RULE: Selection Before Edit
- Text editing is ONLY allowed when this component is the currently selected option in the foundation.
- Unity's TMP_InputField allows editing on any pointer click, even if the component isn't selected.
- This creates an invalid state where typing is possible while navigation continues elsewhere.
- We enforce selection-before-edit by intercepting pointer events (IPointerDownHandler).
Click-to-submit behavior: - Implements IPointerDownHandler to intercept clicks BEFORE TMP_InputField can process them.
- On click, checks if this component is the selected option (_wantsHighlightVisible).
- If not selected: forces selection through the foundation, then triggers Submit/Activate.
- If already selected: allows the click to propagate to TMP_InputField for editing.
- Implements ISelectHandler as backup for controller/keyboard selection.
PREFAB INTEGRATION NOTE:
This component handles ALL pointer events via code. The prefab's EventTrigger component
(if present) is automatically cleared to prevent conflicts. Specifically: - Pointer Enter → SetFocus: REMOVED (conflicts with keyboard/gamepad navigation)
- Pointer Down → SetFocus/Submit: REMOVED (handled by IPointerDownHandler)
TMP_InputField callbacks (OnSelect, OnDeselect) should NOT be wired to Submit/Cancel
in the prefab; this is handled via code subscriptions (onSelect, onEndEdit listeners).
UnityUiInputComponentActions
Unity UI input component actions that handle text editing, submission, and cancellation events.
Extends interactable component actions to provide comprehensive input field interaction capabilities.
Implements IUiEditableActions, IUiSubmittableActions, and IUiCancellableActions for complete input functionality.
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.
UnityUiInteractableComponent
Abstract base class for all Unity UI interactable components in the Serenity foundation.
UnityUiSelectorComponent
Unity UI selector component that provides option selection functionality with multiple value type support.
Extends the submit component to handle array-based value selection including string, integer, and float types.
Implements IUiSelectable interface for comprehensive option selection and value management within the Unity UI system.
UnityUiSelectorComponentActions
Unity UI selector component actions that handle option selection and value change events.
Extends submit component actions to provide comprehensive selector interaction capabilities including value changes and selectable values updates.
Implements IUiSelectableActions interface for complete option selection functionality within the UI system.
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.
UnityUiSliderComponent
Unity UI slider component that provides range-based value selection with configurable bounds and precision.
Supports both integer and float value types with automatic rounding and validation for numeric input within defined ranges.
Implements IUiSlideable interface for comprehensive range control functionality within the Unity UI system.
UnityUiSliderComponentActions
Unity UI slider component actions that handle range value changes and bound modifications.
Extends interactable component actions to provide comprehensive slider interaction capabilities including value changes, minimum/maximum value updates.
Implements IUiSlideableActions interface for complete range control functionality within the UI system.
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.
UnityUiSubmitComponent
Unity-specific UI submit component that handles button interactions and submission events with optional selector adaptation.
Provides button functionality with text display, layout management, and dynamic selector width adjustment based on text content.
Implements IUiSubmittable interface for submission event handling within the Unity UI system.
UnityUiSubmitComponentActions
Unity UI submit component actions that handle submission events and button interactions.
Extends interactable component actions to provide submit-specific callback functionality.
Implements IUiSubmittableActions interface for comprehensive submission event handling within the UI system.
UnityUiSubmitComponentParameters
Unity-specific parameters for submit UI components that handle button submission functionality.
Extends interactable component parameters to provide configuration for submit button components.
Inherits all standard interactable component configuration while maintaining submit-specific behavior characteristics.
UnityUiTMP_TextLocalizationUpdaterComponent
Unity component that manages TextMeshPro text localization using Unity's Localization system.
Automatically updates localized strings based on current text content and provides manual refresh capabilities.
Integrates with Unity Localization package to provide dynamic text translation for UI elements.
UnityUiToggleComponent
Unity UI toggle component that provides toggle and submit functionality for boolean value selection.
Combines toggle behavior with submittable actions to create interactive UI elements for binary choices.
Implements both IUiToggleable and IUiSubmittable interfaces for comprehensive boolean input handling within the Unity UI system.
UnityUiToggleComponentActions
Unity-specific actions for toggle UI components that handle boolean value interactions.
Extends interactable component actions to include toggle-specific callbacks such as value change and submission events.
Implements both IUiToggleableActions and IUiSubmittableActions interfaces for comprehensive toggle interaction handling.
UnityUiToggleComponentParameters
Unity-specific parameters for toggle UI components that handle boolean value selection.
Extends interactable component parameters to include toggle-specific configuration such as initial value state.
Implements IUiToggleableParameters interface to provide foundation-agnostic toggle functionality within the Unity UI system.