logo SERENITY
Game Systems Foundation
Search Results for

    Show / Hide Table of Contents

    Interface IUiInteractable

    Interface for a UI component that can be interacted with.

    Inherited Members
    IUiComponent.GetUiElement()
    IUiComponent.SetUiElement(IFoundationViewElement)
    IUiComponent.SetView(IViewBase)
    IUiComponent.GetView()
    IUiComponent.Awake()
    IUiComponent.OnEnable()
    IUiComponent.Update()
    IUiComponent.OnDisable()
    IUiComponent.OnDestroy()
    IUiComponent.ComponentParameters
    IUiComponent.ComponentActions
    Namespace: Serenity.Ui.Application.Interfaces.Components
    Assembly: Serenity.Ui.Application.dll
    Syntax
    public interface IUiInteractable : IUiComponent, IComponent, IFoundationSettings

    Properties

    InteractableActions

    Gets the actions for the interactable component.

    Declaration
    IUiInteractableActions InteractableActions { get; }
    Property Value
    Type Description
    IUiInteractableActions

    The actions for the interactable component.

    InteractableParameters

    Gets the parameters for the interactable component.

    Declaration
    IUiInteractableParameters InteractableParameters { get; }
    Property Value
    Type Description
    IUiInteractableParameters

    The parameters for the interactable component.

    Methods

    Blur()

    Removes the focus from the UI component.

    Declaration
    void Blur()

    Cancel()

    Cancels the current action on the UI component.

    Declaration
    void Cancel()

    DecrementValue()

    Decrements the value of the UI component.

    Declaration
    void DecrementValue()

    Focus()

    Sets the focus on the UI component.

    Declaration
    void Focus()

    GetButtonElements(bool)

    Gets the list of button elements for the UI component.

    Declaration
    List<IFoundationViewElement> GetButtonElements(bool includeMainButton = true)
    Parameters
    Type Name Description
    bool includeMainButton

    If true, includes the main button in the returned list.

    Returns
    Type Description
    List<IFoundationViewElement>

    The list of button elements for the UI component.

    GetHighlightElement()

    Gets the highlight element for the UI component.

    Declaration
    IFoundationViewElement GetHighlightElement()
    Returns
    Type Description
    IFoundationViewElement

    The highlight element for the UI component.

    GetIndex()

    Gets the index of the UI component.

    Declaration
    int GetIndex()
    Returns
    Type Description
    int

    The index of the UI component.

    GetIsDragging()

    Gets whether the UI component is being dragged.

    Declaration
    bool GetIsDragging()
    Returns
    Type Description
    bool

    True if the component is being dragged; otherwise, false.

    GetLabelElement()

    Gets the label element for the UI component.

    Declaration
    IFoundationViewElement GetLabelElement()
    Returns
    Type Description
    IFoundationViewElement

    The label element for the UI component.

    GetMainButtonElement()

    Gets the main button element for the UI component.

    Declaration
    IFoundationViewElement GetMainButtonElement()
    Returns
    Type Description
    IFoundationViewElement

    The main button element for the UI component.

    GetUiComponentInteractionType()

    Gets the type of interaction for the UI component.

    Declaration
    UiComponentInteractionType GetUiComponentInteractionType()
    Returns
    Type Description
    UiComponentInteractionType

    The type of interaction for the UI component.

    GetValueElement()

    Gets the value element for the UI component.

    Declaration
    IFoundationViewElement GetValueElement()
    Returns
    Type Description
    IFoundationViewElement

    The value element for the UI component.

    IncrementValue()

    Increments the value of the UI component.

    Declaration
    void IncrementValue()

    Initialize(IUiComponentParameters, IUiComponentActions, ILogService)

    Initializes the UI interactable component with the specified parameters and actions.

    Declaration
    void Initialize(IUiComponentParameters parameters, IUiComponentActions uiComponentActions, ILogService logService)
    Parameters
    Type Name Description
    IUiComponentParameters parameters

    The parameters for the UI component.

    IUiComponentActions uiComponentActions

    The actions for the UI component.

    ILogService logService

    The logging service to use.

    OnDraggingEnd()

    Called when dragging ends.

    Declaration
    void OnDraggingEnd()

    OnDraggingStart()

    Called when dragging starts.

    Declaration
    void OnDraggingStart()

    SelectComponentById(string)

    Selects a component by its identifier.

    Declaration
    void SelectComponentById(string id)
    Parameters
    Type Name Description
    string id

    SelectNextComponent()

    Selects the next component in the UI.

    Declaration
    void SelectNextComponent()

    SelectPreviousComponent()

    Selects the previous component in the UI.

    Declaration
    void SelectPreviousComponent()

    SetButtonElements(List<IFoundationViewElement>)

    Sets the list of button elements for the UI component.

    Declaration
    void SetButtonElements(List<IFoundationViewElement> buttons)
    Parameters
    Type Name Description
    List<IFoundationViewElement> buttons

    The list of button elements to set.

    SetFocus(bool)

    Sets the focus state of the UI component.

    Declaration
    void SetFocus(bool active)
    Parameters
    Type Name Description
    bool active

    SetHighlightElement(IFoundationViewElement)

    Sets the highlight element for the UI component.

    Declaration
    void SetHighlightElement(IFoundationViewElement highlight)
    Parameters
    Type Name Description
    IFoundationViewElement highlight

    The highlight element to set.

    SetIndex(int)

    Sets the index of the UI component.

    Declaration
    void SetIndex(int index)
    Parameters
    Type Name Description
    int index

    The index to set.

    SetIsDragging(bool)

    Sets whether the UI component is being dragged.

    Declaration
    void SetIsDragging(bool isDragging)
    Parameters
    Type Name Description
    bool isDragging

    If true, the component is being dragged.

    SetLabelElement(IFoundationViewElement)

    Sets the label element for the UI component.

    Declaration
    void SetLabelElement(IFoundationViewElement label)
    Parameters
    Type Name Description
    IFoundationViewElement label

    The label element to set.

    SetMainButtonElement(IFoundationViewElement)

    Sets the main button element for the UI component.

    Declaration
    void SetMainButtonElement(IFoundationViewElement mainButton)
    Parameters
    Type Name Description
    IFoundationViewElement mainButton

    The main button element to set.

    SetUiComponentInteractionType(UiComponentInteractionType)

    Sets the type of interaction for the UI component.

    Declaration
    void SetUiComponentInteractionType(UiComponentInteractionType optionInteractionTypeType)
    Parameters
    Type Name Description
    UiComponentInteractionType optionInteractionTypeType

    The type of interaction to set.

    SetValue(string)

    Sets the value of the UI component.

    Declaration
    void SetValue(string value)
    Parameters
    Type Name Description
    string value

    SetValueElement(IFoundationViewElement)

    Sets the value element for the UI component.

    Declaration
    void SetValueElement(IFoundationViewElement valueElement)
    Parameters
    Type Name Description
    IFoundationViewElement valueElement

    The value element to set.

    Submit()

    Gets the value of the UI component.

    Declaration
    void Submit()
    In this article
    © 2026 Serenity. All Rights Reserved