Class AUxtPressableToggleButtonActor
A derived actor of AUxtPressableButtonActor with a UUxtToggleStateComponent component to track state and visuals for a button can which can be toggled on or off (checked or unchecked).
Inheritance
Inherited Members
Namespace:
Assembly: .dll
Syntax
public: class AUxtPressableToggleButtonActor : public xtPressableButtonActor
Constructors
| Improve this Doc View SourceAUxtPressableToggleButtonActor()
Declaration
public: AUxtPressableToggleButtonActor()
UPROPERTY(EditAnywhere, Category="Uxt Pressable Button", BlueprintGetter="IsInitiallyChecked", BlueprintSetter="SetIsInitiallyChecked")
Should the button be toggled on or off at BeginPlay?
Declaration
protected: UPROPERTY(EditAnywhere, Category="Uxt Pressable Button", BlueprintGetter="IsInitiallyChecked", BlueprintSetter="SetIsInitiallyChecked") bool bIsInitiallyChecked
Parameters
| Type | Name | Description |
|---|---|---|
| EditAnywhere | _a_uxt_pressable_toggle_button_actor_UPROPERTY_EditAnywhere_Category_BlueprintGetter_BlueprintSetter_ | |
| Category | _a_uxt_pressable_toggle_button_actor_UPROPERTY_EditAnywhere_Category_BlueprintGetter_BlueprintSetter_ | |
| BlueprintGetter | _a_uxt_pressable_toggle_button_actor_UPROPERTY_EditAnywhere_Category_BlueprintGetter_BlueprintSetter_ | |
| BlueprintSetter | _a_uxt_pressable_toggle_button_actor_UPROPERTY_EditAnywhere_Category_BlueprintGetter_BlueprintSetter_ |
Fields
| Improve this Doc View SourcebToggleOnRelease
Should the button toggle on press or release?
Declaration
protected: bool bToggleOnRelease= false
Field Value
| Type | Description |
|---|---|
| bool |
TogglePlateComponent
Visual component to indicate the toggled state.
Declaration
protected: UUxtBackPlateComponent * TogglePlateComponent= nullptr
Field Value
| Type | Description |
|---|---|
| UUxtBackPlateComponent * |
ToggleStateComponent
Component which keeps track of the toggled state.
Declaration
protected: UUxtToggleStateComponent * ToggleStateComponent= nullptr
Field Value
| Type | Description |
|---|---|
| UUxtToggleStateComponent * |
Methods
| Improve this Doc View SourceBeginPlay()
Subscribes to toggle events and sets the initial toggle state.
Declaration
public: virtual void BeginPlay() override
ConstructVisuals()
Adds toggle visuals and components.
Declaration
public: virtual void ConstructVisuals() override
Overrides
| Improve this Doc View SourceIsInitiallyChecked()
Gets if the button was toggled on at BeginPlay.
Declaration
public: bool IsInitiallyChecked() const
Returns
| Type | Description |
|---|---|
| bool |
OnButtonPressed(UUxtPressableButtonComponent *Button, UUxtPointerComponent *Pointer)
Button pressed event delegate.
Declaration
protected: virtual void OnButtonPressed(UUxtPressableButtonComponent *Button, UUxtPointerComponent *Pointer) override
Parameters
| Type | Name | Description |
|---|---|---|
| UUxtPressableButtonComponent * | Button | |
| UUxtPointerComponent * | Pointer |
Overrides
| Improve this Doc View SourceOnButtonReleased(UUxtPressableButtonComponent *Button, UUxtPointerComponent *Pointer)
Button released event delegate.
Declaration
protected: virtual void OnButtonReleased(UUxtPressableButtonComponent *Button, UUxtPointerComponent *Pointer) override
Parameters
| Type | Name | Description |
|---|---|---|
| UUxtPressableButtonComponent * | Button | |
| UUxtPointerComponent * | Pointer |
Overrides
| Improve this Doc View SourceOnButtonToggled(UUxtToggleStateComponent *ToggleState)
Updates the toggle visuals when the toggles state changes.
Declaration
protected: virtual void OnButtonToggled(UUxtToggleStateComponent *ToggleState)
Parameters
| Type | Name | Description |
|---|---|---|
| UUxtToggleStateComponent * | ToggleState |
OnConstruction(const FTransform &Transform)
Ensures the toggle visuals get updated when constructed.
Declaration
public: virtual void OnConstruction(const FTransform &Transform) override
Parameters
| Type | Name | Description |
|---|---|---|
| const FTransform & | Transform |
Overrides
| Improve this Doc View SourceRemoveTogglePlate()
Option to remove the toggle plate if it is not needed for this button (for example in derived classes).
Declaration
public: void RemoveTogglePlate()
SetIsInitiallyChecked(bool InitiallyChecked)
Sets if the button was toggled on at BeginPlay. This method has no function after BeginPlay.
Declaration
public: void SetIsInitiallyChecked(bool InitiallyChecked)
Parameters
| Type | Name | Description |
|---|---|---|
| bool | InitiallyChecked |
UpdateToggleVisuals()
Alters the toggle visuals when the toggle state changes.
Declaration
public: virtual void UpdateToggleVisuals()