Class AUxtPressableButtonActor
The default pressable button actor which programmatically builds an actor hierarchy with a back plate, front plate, icon, and label. All button properties within this class are reactive at edit and runtime. This actor also contains behaviors to support icon focus animation and sound playback. This class is extensible to support derived button types.
Inheritance
System::Object
AActor
AUxtPressableButtonActor
Namespace:
Assembly: .dll
public: class AUxtPressableButtonActor : public xtBasePressableButtonActor
Constructors
|
Improve this Doc
View Source
Declaration
public: AUxtPressableButtonActor()
|
Improve this Doc
View Source
Structure which contains properties for the button's icon.
Declaration
protected: UPROPERTY(EditAnywhere, BlueprintGetter="GetIconBrush", BlueprintSetter="SetIconBrush", Category="Button", meta=(EditCondition="bCanEditIconBrush")) FUxtIconBrush IconBrush
Parameters
| Type |
Name |
Description |
| EditAnywhere |
_a_uxt_pressable_button_actor_UPROPERTY_EditAnywhere_BlueprintGetter_BlueprintSetter_Category_meta_ |
|
| BlueprintGetter |
_a_uxt_pressable_button_actor_UPROPERTY_EditAnywhere_BlueprintGetter_BlueprintSetter_Category_meta_ |
|
| BlueprintSetter |
_a_uxt_pressable_button_actor_UPROPERTY_EditAnywhere_BlueprintGetter_BlueprintSetter_Category_meta_ |
|
| Category |
_a_uxt_pressable_button_actor_UPROPERTY_EditAnywhere_BlueprintGetter_BlueprintSetter_Category_meta_ |
|
| meta |
_a_uxt_pressable_button_actor_UPROPERTY_EditAnywhere_BlueprintGetter_BlueprintSetter_Category_meta_ |
|
Fields
|
Improve this Doc
View Source
Audio playback component.
Declaration
protected: UAudioComponent * AudioComponent= nullptr
Field Value
| Type |
Description |
| UAudioComponent * |
|
|
Improve this Doc
View Source
Back plate mesh component.
Declaration
protected: UUxtBackPlateComponent * BackPlateMeshComponent= nullptr
Field Value
| Type |
Description |
| UUxtBackPlateComponent * |
|
|
Improve this Doc
View Source
Pivot component to support back plate compression visuals.
Declaration
protected: USceneComponent * BackPlatePivotComponent= nullptr
Field Value
| Type |
Description |
| USceneComponent * |
|
|
Improve this Doc
View Source
Allows derived classes to control if the icon brush can be edited.
Declaration
protected: bool bCanEditIconBrush= true
Field Value
|
Improve this Doc
View Source
True if the button should display a back plate. Collections of buttons should share a common back plate.
Declaration
protected: bool bIsPlated= true
Field Value
|
Improve this Doc
View Source
Structure which contains properties for the button's appearance and behavior.
Declaration
protected: FUxtButtonBrush ButtonBrush
Field Value
|
Improve this Doc
View Source
The current animation time of the focus animation.
Declaration
protected: float FocusTimer= 0
Field Value
|
Improve this Doc
View Source
The center of mass pivot of the front plate.
Declaration
protected: USceneComponent * FrontPlateCenterComponent= nullptr
Field Value
| Type |
Description |
| USceneComponent * |
|
|
Improve this Doc
View Source
Front plate mesh component.
Declaration
protected: UStaticMeshComponent * FrontPlateMeshComponent= nullptr
Field Value
| Type |
Description |
| UStaticMeshComponent * |
|
|
Improve this Doc
View Source
Pivot component to support front plate compression visuals.
Declaration
protected: USceneComponent * FrontPlatePivotComponent= nullptr
Field Value
| Type |
Description |
| USceneComponent * |
|
|
Improve this Doc
View Source
Declaration
protected: UTextRenderComponent * IconComponent= nullptr
Field Value
| Type |
Description |
| UTextRenderComponent * |
|
|
Improve this Doc
View Source
Localizable text for the label.
Declaration
protected: FText Label= NSLOCTEXT("PressableButtonActor", "LabelDefault", "16x32x32mm")
Field Value
|
Improve this Doc
View Source
Declaration
protected: UTextRenderComponent * LabelComponent= nullptr
Field Value
| Type |
Description |
| UTextRenderComponent * |
|
|
Improve this Doc
View Source
LabelTextBrush
Text settings for the label.
Declaration
protected: FUxtTextBrush LabelTextBrush
Field Value
|
Improve this Doc
View Source
The active material based on which pointer triggered the pulse.
Declaration
protected: uint32 MaterialIndex= 0
Field Value
|
Improve this Doc
View Source
The millimeter size of the button which dynamically resizes components within the button. This will preserve the actor scale.
Declaration
protected: FVector MillimeterSize= FVector(16, 32, 32)
Field Value
|
Improve this Doc
View Source
Handle to the original (unaltered) material before pulsing.
Declaration
protected: UMaterialInterface * PrePulseMaterial= nullptr
Field Value
| Type |
Description |
| UMaterialInterface * |
|
|
Improve this Doc
View Source
The current animation time of the pulse fade out animation.
Declaration
protected: float PulseFadeTimer= -1
Field Value
|
Improve this Doc
View Source
Handle to any dynamic material the pulse instantiates due to material parameter changes.
Declaration
protected: UMaterialInstanceDynamic * PulseMaterialInstance= nullptr
Field Value
| Type |
Description |
| UMaterialInstanceDynamic * |
|
|
Improve this Doc
View Source
The current animation time of the pulse animation.
Declaration
protected: float PulseTimer= -1
Field Value
Methods
|
Improve this Doc
View Source
Method to update the focus animation and behavior. Returns true when the animation is complete.
Declaration
protected: virtual bool AnimateFocus(float DeltaTime)
Parameters
| Type |
Name |
Description |
| float |
DeltaTime |
|
Returns
|
Improve this Doc
View Source
Method to update the pulse animation and behavior. Returns true when the animation is complete.
Declaration
protected: virtual bool AnimatePulse(float DeltaTime)
Parameters
| Type |
Name |
Description |
| float |
DeltaTime |
|
Returns
|
Improve this Doc
View Source
Starts the pulse animation for a given pointer.
Declaration
public: bool BeginPulse(const UUxtPointerComponent *Pointer)
Parameters
Returns
|
Improve this Doc
View Source
Creates (and initializes) the button's icon hierarchy.
Declaration
public: virtual void ConstructIcon()
|
Improve this Doc
View Source
Creates (and initializes) the button's label hierarchy.
Declaration
public: virtual void ConstructLabel()
|
Improve this Doc
View Source
Creates (and initializes) the button's visual hierarchy.
Declaration
public: virtual void ConstructVisuals()
|
Improve this Doc
View Source
Utility method to allocate and add a scene component to the button.
Declaration
protected: T * CreateAndAttachComponent(FName Name, USceneComponent *Parent)
Parameters
| Type |
Name |
Description |
| FName |
Name |
|
| USceneComponent * |
Parent |
|
Returns
Type Parameters
| Name |
Description |
| _a_uxt_pressable_button_actor_CreateAndAttachComponent_FName_USceneComponent___ |
|
|
Improve this Doc
View Source
Accessor to the button's button brush.
Declaration
public: const FUxtButtonBrush & GetButtonBrush() const
Returns
|
Improve this Doc
View Source
Accessor to the button's icon brush.
Declaration
public: const FUxtIconBrush & GetIconBrush() const
Returns
|
Improve this Doc
View Source
Accessor to the button's label.
Declaration
public: const FText & GetLabel() const
Returns
| Type |
Description |
| const FText & |
|
|
Improve this Doc
View Source
GetLabelTextBrush()
Accessor to the button's label text brush.
Declaration
public: const FUxtTextBrush & GetLabelTextBrush() const
Returns
|
Improve this Doc
View Source
Accessor to the button size in millimeters.
Declaration
public: FVector GetMillimeterSize() const
Returns
|
Improve this Doc
View Source
Accessor to the button size in default units.
Declaration
public: FVector GetSize() const
Returns
|
Improve this Doc
View Source
Accessor to if the button is plated.
Declaration
public: bool IsPlated() const
Returns
|
Improve this Doc
View Source
Returns true if a pulse is currently animating.
Declaration
public: bool IsPulsing() const
Returns
|
Improve this Doc
View Source
Method which is invoked when the button is focused on.
Declaration
protected: virtual void OnBeginFocus(UUxtPressableButtonComponent *Button, UUxtPointerComponent *Pointer, bool WasAlreadyFocused)
Parameters
|
Improve this Doc
View Source
Method which is invoked when the button is disabled.
Declaration
protected: virtual void OnButtonDisabled(UUxtPressableButtonComponent *Button)
Parameters
|
Improve this Doc
View Source
Method which is invoked when the button is enabled.
Declaration
protected: virtual void OnButtonEnabled(UUxtPressableButtonComponent *Button)
Parameters
|
Improve this Doc
View Source
Method which is invoked when the button is pressed.
Declaration
protected: virtual void OnButtonPressed(UUxtPressableButtonComponent *Button, UUxtPointerComponent *Pointer)
Parameters
|
Improve this Doc
View Source
Method which is invoked when the button is released.
Declaration
protected: virtual void OnButtonReleased(UUxtPressableButtonComponent *Button, UUxtPointerComponent *Pointer)
Parameters
|
Improve this Doc
View Source
Creates (and initializes) the button hierarchy when properties are changed.
Declaration
public: virtual void OnConstruction(const FTransform &Transform) override
Parameters
| Type |
Name |
Description |
| const FTransform & |
Transform |
|
|
Improve this Doc
View Source
Applies a new button brush.
Declaration
public: void SetButtonBrush(const FUxtButtonBrush &Brush)
Parameters
|
Improve this Doc
View Source
Applies a new icon brush.
Declaration
public: void SetIconBrush(const FUxtIconBrush &Brush)
Parameters
|
Improve this Doc
View Source
Enables or disabled the button back plate.
Declaration
public: void SetIsPlated(bool IsPlated)
Parameters
| Type |
Name |
Description |
| bool |
IsPlated |
|
|
Improve this Doc
View Source
SetLabel(const FText &NewLabel)
Declaration
public: void SetLabel(const FText &NewLabel)
Parameters
| Type |
Name |
Description |
| const FText & |
NewLabel |
|
|
Improve this Doc
View Source
SetLabelTextBrush(const FUxtTextBrush &Brush)
Applies a new label text brush.
Declaration
public: void SetLabelTextBrush(const FUxtTextBrush &Brush)
Parameters
|
Improve this Doc
View Source
Sets the button size in millimeters.
Declaration
public: void SetMillimeterSize(FVector Size)
Parameters
| Type |
Name |
Description |
| FVector |
Size |
|
|
Improve this Doc
View Source
Sets the button size in default units.
Declaration
public: void SetSize(FVector Size)
Parameters
| Type |
Name |
Description |
| FVector |
Size |
|
|
Improve this Doc
View Source
Conditional tick method which occurs when a button needs to animate.
Declaration
public: virtual void Tick(float DeltaTime) override
Parameters
| Type |
Name |
Description |
| float |
DeltaTime |
|