public/0.12.xpublic/0.8.xpublic/0.9.xpublic/0.11.x

    Show / Hide Table of Contents

    Class UUxtToggleGroupComponent

    Component which controls the state of a collection of UUxtToggleStateComponent to behave like a radio group. The component ensures that only one toggle state can be toggled on at a time. Optionally, all states can be toggled off if the SelectedIndex is set to INDEX_NONE.

    Inheritance
    System::Object
    UActorComponent
    UUxtToggleGroupComponent
    Inherited Members
    UUxtToggleGroupComponent
    Namespace:
    Assembly: .dll
    Syntax
    public: class UUxtToggleGroupComponent

    Fields

    | Improve this Doc View Source

    OnGroupSelectionChanged

    Event which broadcasts when the toggle group selection changes.

    Declaration
    public: FUxtToggleGroupSelectionChangedDelegate OnGroupSelectionChanged
    Field Value
    Type Description
    FUxtToggleGroupSelectionChangedDelegate
    | Improve this Doc View Source

    ToggleStates

    A collection of toggle states that act as one toggle group, only one state can be toggle on at a time.

    Declaration
    protected: TArray<ToggleStateWeak> ToggleStates
    Field Value
    Type Description
    TArray<ToggleStateWeak>

    Methods

    | Improve this Doc View Source

    AddToggleState(UUxtToggleStateComponent *ToggleState)

    Adds a toggle state to the end of the ToggleStates list. Returns true if the insertion was successful.

    Declaration
    public: bool AddToggleState(UUxtToggleStateComponent *ToggleState)
    Parameters
    Type Name Description
    UUxtToggleStateComponent * ToggleState
    Returns
    Type Description
    bool
    | Improve this Doc View Source

    BeginPlay()

    Extracts references from the ToggleReferences and sets the initial selection.

    Declaration
    protected: virtual void BeginPlay() override
    | Improve this Doc View Source

    EmptyGroup()

    Removes all toggle states from the ToggleStates list and invalidates the selected index.

    Declaration
    public: void EmptyGroup()
    | Improve this Doc View Source

    GetGroupCount()

    Returns how many toggle states are within the group.

    Declaration
    public: int32 GetGroupCount() const
    Returns
    Type Description
    int32
    | Improve this Doc View Source

    GetSelectedIndex()

    Accessor to the selected index.

    Declaration
    public: int32 GetSelectedIndex() const
    Returns
    Type Description
    int32
    | Improve this Doc View Source

    GetToggleStateIndex(const UUxtToggleStateComponent *ToggleState)

    Returns the index of the ToggleState in the ToggleStates list, if the ToggleState does not exist returns INDEX_NONE (-1).

    Declaration
    public: int32 GetToggleStateIndex(const UUxtToggleStateComponent *ToggleState) const
    Parameters
    Type Name Description
    const UUxtToggleStateComponent * ToggleState
    Returns
    Type Description
    int32
    | Improve this Doc View Source

    InsertToggleState(UUxtToggleStateComponent *ToggleState, int32 Index)

    Adds a toggle state to a specific index within the ToggleStates list. Increments the selection index if the toggle state is added before the current selection index. Returns true if the insertion was successful.

    Declaration
    public: bool InsertToggleState(UUxtToggleStateComponent *ToggleState, int32 Index)
    Parameters
    Type Name Description
    UUxtToggleStateComponent * ToggleState
    int32 Index
    Returns
    Type Description
    bool
    | Improve this Doc View Source

    OnToggled(UUxtToggleStateComponent *ToggleState)

    Delegate for when any toggle state within ToggleStates is toggled.

    Declaration
    protected: virtual void OnToggled(UUxtToggleStateComponent *ToggleState)
    Parameters
    Type Name Description
    UUxtToggleStateComponent * ToggleState
    | Improve this Doc View Source

    RemoveToggleState(UUxtToggleStateComponent *ToggleState)

    Removes a toggle state from the ToggleStates list. Returns true if the removal was successful.

    Declaration
    public: bool RemoveToggleState(UUxtToggleStateComponent *ToggleState)
    Parameters
    Type Name Description
    UUxtToggleStateComponent * ToggleState
    Returns
    Type Description
    bool
    | Improve this Doc View Source

    SetSelectedIndex(int32 Index)

    Mutates the selected index, broadcasts events, and performs bounds checking.

    Declaration
    public: void SetSelectedIndex(int32 Index)
    Parameters
    Type Name Description
    int32 Index
    • Improve this Doc
    • View Source
    In This Article
    • Fields
      • OnGroupSelectionChanged
      • ToggleStates
    • Methods
      • AddToggleState(UUxtToggleStateComponent *ToggleState)
      • BeginPlay()
      • EmptyGroup()
      • GetGroupCount()
      • GetSelectedIndex()
      • GetToggleStateIndex(const UUxtToggleStateComponent *ToggleState)
      • InsertToggleState(UUxtToggleStateComponent *ToggleState, int32 Index)
      • OnToggled(UUxtToggleStateComponent *ToggleState)
      • RemoveToggleState(UUxtToggleStateComponent *ToggleState)
      • SetSelectedIndex(int32 Index)
    Back to top Generated by DocFX