Documentation for the Unreal C++ Plugin
Loading...
Searching...
No Matches
UButtonWidget Class Reference

Custom widget class representing a button. More...

#include <ButtonWidget.h>

Inheritance diagram for UButtonWidget:
[legend]

Public Member Functions

void ActivateButtonHighlight ()
 
void ActivateButtonPulsationHighlight ()
 
virtual void ChangeButtonState (const bool bState)
 Changes the state of the button .
 
void DeactivateButtonHighlight ()
 
const FText & GetButtonName ()
 UFUNCTION(BlueprintCallable)
 
bool GetState () const
 Gets the state of the button.
 
ButtonType GetType () const
 
virtual void NativeOnInitialized () override
 
virtual void NativePreConstruct () override
 
void OnHintActivated (bool Activate)
 UFUNCTION(BlueprintNativeEvent, BlueprintCallable)
 
void RefreshWidgetStyle ()
 Refreshes the visual style of the button widget.
 
void SetButtonName (const FText &Name)
 UFUNCTION(BlueprintCallable)
 

Public Attributes

FText ActiveStep
 UPROPERTY(BlueprintReadWrite)
 
FText ActiveSubStep
 UPROPERTY(BlueprintReadWrite)
 
bool bWidgetActiveOnStep
 UPROPERTY(BlueprintReadWrite)
 
UHintManagerHintManager
 UPROPERTY(BlueprintReadWrite)
 
FClickEventDelegate OnClickEventDelegate
 UPROPERTY(BlueprintAssignable, BlueprintCallable, Category = "Delegate")
 
FClickEventPtrDelegate OnClickEventPtrDelegate
 UPROPERTY(BlueprintAssignable, BlueprintCallable, Category = "Delegate")
 
FClickEventSelfPtrDelegate OnClickEventSelfPtrDelegate
 UPROPERTY(BlueprintAssignable, BlueprintCallable, Category = "Delegate")
 
UStoryManagerStoryManager
 UPROPERTY(BlueprintReadWrite)
 

Protected Attributes

bool ActivateHighlightOnEachActiveStep = false
 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Highlight")
 
bool bIsPulsationHighlight = false
 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Highlight")
 
bool bIsSelectable = true
 UPROPERTY(EditAnywhere, BlueprintReadWrite)
 
UTextBlock * BtnName
 UPROPERTY(BlueprintReadOnly, meta = (BindWidget))
 
UButton * Button
 UPROPERTY(BlueprintReadOnly, meta = (BindWidget))
 
UBorder * ButtonBounds
 UPROPERTY(BlueprintReadOnly, meta = (BindWidget))
 
FLinearColor ButtonBoundsColor = FLinearColor::Black
 UPROPERTY(EditAnywhere, BlueprintReadWrite)
 
float ButtonBoundsWidth = 2.f
 UPROPERTY(EditAnywhere, BlueprintReadWrite)
 
UBorder * ButtonHighlight
 UPROPERTY(BlueprintReadOnly, meta = (BindWidget))
 
UWidgetAnimation * ButtonHighlightAnimation
 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Highlight")
 
FLinearColor ButtonHighlightColor = FLinearColor(0.25f, 0.6f, 0.0f, 0.f)
 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Highlight")
 
float ButtonHighlightWidth = 0.f
 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Highlight")
 
FText ButtonName = FText::FromString(TEXT("Text"))
 UPROPERTY(EditAnywhere, BlueprintReadWrite)
 
FLinearColor ButtonNameColor = FLinearColor::White
 UPROPERTY(EditAnywhere, BlueprintReadWrite)
 
float ButtonNameFontSize = 18.f
 UPROPERTY(EditAnywhere, BlueprintReadWrite)
 
FLinearColor DefaultButtonColor = FLinearColor(0.91f, 0.22f, 0.0f, 1.0f)
 UPROPERTY(EditAnywhere, BlueprintReadWrite)
 
FLinearColor DefaultHoveredButtonColor = FLinearColor(0.25f, 0.6f, 0.0f, 1.0f)
 UPROPERTY(EditAnywhere, BlueprintReadWrite)
 
TArray< FText > HighlightActiveSteps
 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Highlight")
 
TArray< FText > HighlightActiveSubSteps
 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Highlight")
 
float HighlightAnimationSpeed = 1.f
 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Highlight")
 
USoundBase * HoverSound
 UPROPERTY(EditAnywhere, BlueprintReadWrite)
 
FLinearColor PressedButtonColor = FLinearColor(0.25f, 0.6f, 0.0f, 1.0f)
 UPROPERTY(EditAnywhere, BlueprintReadWrite)
 
FLinearColor SelectedButtonColor = FLinearColor(0.25f, 0.6f, 0.0f, 1.0f)
 UPROPERTY(EditAnywhere, BlueprintReadWrite)
 
FLinearColor SelectedHoveredButtonColor = FLinearColor(0.25f, 0.6f, 0.0f, 1.0f)
 UPROPERTY(EditAnywhere, BlueprintReadWrite)
 
USoundBase * SelectSound
 UPROPERTY(EditAnywhere, BlueprintReadWrite)
 
ButtonType Type
 

Private Member Functions

void ButtonHovered ()
 UFUNCTION()
 
void ButtonReleased ()
 UFUNCTION()
 
 GENERATED_BODY ()
 
void NewStep (FStoryStep NewStep, bool IsForward)
 UFUNCTION()
 
void NewSubStep (FStoryStep NewSubStep)
 UFUNCTION()
 
void OnPressed ()
 UFUNCTION()
 
void OnUnHovered ()
 UFUNCTION()
 
void StoryLoaded ()
 UFUNCTION()
 
void SwitchButtonColor (const bool bState)
 Switches the button color based on the state.
 

Private Attributes

bool bCurrentState
 

Detailed Description

Custom widget class representing a button.

UCLASS()

Definition at line 44 of file ButtonWidget.h.

Member Function Documentation

◆ ActivateButtonHighlight()

void UButtonWidget::ActivateButtonHighlight ( )

Definition at line 114 of file ButtonWidget.cpp.

Here is the caller graph for this function:

◆ ActivateButtonPulsationHighlight()

void UButtonWidget::ActivateButtonPulsationHighlight ( )

Definition at line 120 of file ButtonWidget.cpp.

Here is the caller graph for this function:

◆ ButtonHovered()

void UButtonWidget::ButtonHovered ( )
private

UFUNCTION()

Definition at line 186 of file ButtonWidget.cpp.

Here is the caller graph for this function:

◆ ButtonReleased()

void UButtonWidget::ButtonReleased ( )
private

UFUNCTION()

Definition at line 170 of file ButtonWidget.cpp.

Here is the caller graph for this function:

◆ ChangeButtonState()

void UButtonWidget::ChangeButtonState ( const bool bState)
virtualBlueprintCallable

Changes the state of the button .

Parameters
bStateThe new state of the button (true - selected, false - default).

UFUNCTION(BlueprintCallable)

Reimplemented in UCheckButtonWidget.

Definition at line 85 of file ButtonWidget.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ DeactivateButtonHighlight()

void UButtonWidget::DeactivateButtonHighlight ( )

Definition at line 128 of file ButtonWidget.cpp.

Here is the caller graph for this function:

◆ GENERATED_BODY()

UButtonWidget::GENERATED_BODY ( )
private

◆ GetButtonName()

const FText & UButtonWidget::GetButtonName ( )
BlueprintCallable

UFUNCTION(BlueprintCallable)

Definition at line 80 of file ButtonWidget.cpp.

◆ GetState()

bool UButtonWidget::GetState ( ) const
inlineBlueprintCallable

Gets the state of the button.

Returns
Whether button is selected or not.

UFUNCTION(BlueprintCallable)

Definition at line 87 of file ButtonWidget.h.

◆ GetType()

ButtonType UButtonWidget::GetType ( ) const
inline

Definition at line 89 of file ButtonWidget.h.

◆ NativeOnInitialized()

void UButtonWidget::NativeOnInitialized ( )
overridevirtual

Reimplemented in UCheckButtonWidget.

Definition at line 20 of file ButtonWidget.cpp.

Here is the call graph for this function:

◆ NativePreConstruct()

void UButtonWidget::NativePreConstruct ( )
overridevirtual

Definition at line 67 of file ButtonWidget.cpp.

Here is the call graph for this function:

◆ NewStep()

void UButtonWidget::NewStep ( FStoryStep NewStep,
bool IsForward )
private

UFUNCTION()

Definition at line 207 of file ButtonWidget.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ NewSubStep()

void UButtonWidget::NewSubStep ( FStoryStep NewSubStep)
private

UFUNCTION()

Definition at line 252 of file ButtonWidget.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ OnHintActivated()

void UButtonWidget::OnHintActivated ( bool Activate)
BlueprintNativeEventBlueprintCallable

UFUNCTION(BlueprintNativeEvent, BlueprintCallable)

Here is the caller graph for this function:

◆ OnPressed()

void UButtonWidget::OnPressed ( )
private

UFUNCTION()

Definition at line 202 of file ButtonWidget.cpp.

Here is the caller graph for this function:

◆ OnUnHovered()

void UButtonWidget::OnUnHovered ( )
private

UFUNCTION()

Definition at line 197 of file ButtonWidget.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ RefreshWidgetStyle()

void UButtonWidget::RefreshWidgetStyle ( )

Refreshes the visual style of the button widget.

Definition at line 96 of file ButtonWidget.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ SetButtonName()

void UButtonWidget::SetButtonName ( const FText & Name)
BlueprintCallable

UFUNCTION(BlueprintCallable)

Definition at line 74 of file ButtonWidget.cpp.

Here is the caller graph for this function:

◆ StoryLoaded()

void UButtonWidget::StoryLoaded ( )
private

UFUNCTION()

Definition at line 298 of file ButtonWidget.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ SwitchButtonColor()

void UButtonWidget::SwitchButtonColor ( const bool bState)
private

Switches the button color based on the state.

Parameters
bStateWhether button is selected or not.

Definition at line 91 of file ButtonWidget.cpp.

Here is the caller graph for this function:

Member Data Documentation

◆ ActivateHighlightOnEachActiveStep

bool UButtonWidget::ActivateHighlightOnEachActiveStep = false
protectedEditAnywhereBlueprintReadWrite

UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Highlight")

Definition at line 369 of file ButtonWidget.h.

◆ ActiveStep

FText UButtonWidget::ActiveStep
BlueprintReadWrite

UPROPERTY(BlueprintReadWrite)

Definition at line 183 of file ButtonWidget.h.

◆ ActiveSubStep

FText UButtonWidget::ActiveSubStep
BlueprintReadWrite

UPROPERTY(BlueprintReadWrite)

Definition at line 189 of file ButtonWidget.h.

◆ bCurrentState

bool UButtonWidget::bCurrentState
private

Definition at line 372 of file ButtonWidget.h.

◆ bIsPulsationHighlight

bool UButtonWidget::bIsPulsationHighlight = false
protectedEditAnywhereBlueprintReadWrite

UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Highlight")

Definition at line 327 of file ButtonWidget.h.

◆ bIsSelectable

bool UButtonWidget::bIsSelectable = true
protectedEditAnywhereBlueprintReadWrite

UPROPERTY(EditAnywhere, BlueprintReadWrite)

Definition at line 311 of file ButtonWidget.h.

◆ BtnName

UTextBlock* UButtonWidget::BtnName
protectedBlueprintReadOnly

UPROPERTY(BlueprintReadOnly, meta = (BindWidget))

Definition at line 220 of file ButtonWidget.h.

◆ Button

UButton* UButtonWidget::Button
protectedBlueprintReadOnly

UPROPERTY(BlueprintReadOnly, meta = (BindWidget))

Definition at line 214 of file ButtonWidget.h.

◆ ButtonBounds

UBorder* UButtonWidget::ButtonBounds
protectedBlueprintReadOnly

UPROPERTY(BlueprintReadOnly, meta = (BindWidget))

Definition at line 208 of file ButtonWidget.h.

◆ ButtonBoundsColor

FLinearColor UButtonWidget::ButtonBoundsColor = FLinearColor::Black
protectedEditAnywhereBlueprintReadWrite

UPROPERTY(EditAnywhere, BlueprintReadWrite)

Definition at line 234 of file ButtonWidget.h.

◆ ButtonBoundsWidth

float UButtonWidget::ButtonBoundsWidth = 2.f
protectedEditAnywhereBlueprintReadWrite

UPROPERTY(EditAnywhere, BlueprintReadWrite)

Definition at line 227 of file ButtonWidget.h.

◆ ButtonHighlight

UBorder* UButtonWidget::ButtonHighlight
protectedBlueprintReadOnly

UPROPERTY(BlueprintReadOnly, meta = (BindWidget))

Definition at line 202 of file ButtonWidget.h.

◆ ButtonHighlightAnimation

UWidgetAnimation* UButtonWidget::ButtonHighlightAnimation
protectedEditAnywhereBlueprintReadWrite

UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Highlight")

Definition at line 320 of file ButtonWidget.h.

◆ ButtonHighlightColor

FLinearColor UButtonWidget::ButtonHighlightColor = FLinearColor(0.25f, 0.6f, 0.0f, 0.f)
protectedEditAnywhereBlueprintReadWrite

UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Highlight")

Definition at line 362 of file ButtonWidget.h.

◆ ButtonHighlightWidth

float UButtonWidget::ButtonHighlightWidth = 0.f
protectedEditAnywhereBlueprintReadWrite

UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Highlight")

Definition at line 355 of file ButtonWidget.h.

◆ ButtonName

FText UButtonWidget::ButtonName = FText::FromString(TEXT("Text"))
protectedEditAnywhereBlueprintReadWrite

UPROPERTY(EditAnywhere, BlueprintReadWrite)

Definition at line 248 of file ButtonWidget.h.

◆ ButtonNameColor

FLinearColor UButtonWidget::ButtonNameColor = FLinearColor::White
protectedEditAnywhereBlueprintReadWrite

UPROPERTY(EditAnywhere, BlueprintReadWrite)

Definition at line 255 of file ButtonWidget.h.

◆ ButtonNameFontSize

float UButtonWidget::ButtonNameFontSize = 18.f
protectedEditAnywhereBlueprintReadWrite

UPROPERTY(EditAnywhere, BlueprintReadWrite)

Definition at line 241 of file ButtonWidget.h.

◆ bWidgetActiveOnStep

bool UButtonWidget::bWidgetActiveOnStep
BlueprintReadWrite

UPROPERTY(BlueprintReadWrite)

Definition at line 195 of file ButtonWidget.h.

◆ DefaultButtonColor

FLinearColor UButtonWidget::DefaultButtonColor = FLinearColor(0.91f, 0.22f, 0.0f, 1.0f)
protectedEditAnywhereBlueprintReadWrite

UPROPERTY(EditAnywhere, BlueprintReadWrite)

Definition at line 262 of file ButtonWidget.h.

◆ DefaultHoveredButtonColor

FLinearColor UButtonWidget::DefaultHoveredButtonColor = FLinearColor(0.25f, 0.6f, 0.0f, 1.0f)
protectedEditAnywhereBlueprintReadWrite

UPROPERTY(EditAnywhere, BlueprintReadWrite)

Definition at line 276 of file ButtonWidget.h.

◆ HighlightActiveSteps

TArray<FText> UButtonWidget::HighlightActiveSteps
protectedEditAnywhereBlueprintReadWrite

UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Highlight")

Definition at line 341 of file ButtonWidget.h.

◆ HighlightActiveSubSteps

TArray<FText> UButtonWidget::HighlightActiveSubSteps
protectedEditAnywhereBlueprintReadWrite

UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Highlight")

Definition at line 348 of file ButtonWidget.h.

◆ HighlightAnimationSpeed

float UButtonWidget::HighlightAnimationSpeed = 1.f
protectedEditAnywhereBlueprintReadWrite

UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Highlight")

Definition at line 334 of file ButtonWidget.h.

◆ HintManager

UHintManager* UButtonWidget::HintManager
BlueprintReadWrite

UPROPERTY(BlueprintReadWrite)

Definition at line 171 of file ButtonWidget.h.

◆ HoverSound

USoundBase* UButtonWidget::HoverSound
protectedEditAnywhereBlueprintReadWrite

UPROPERTY(EditAnywhere, BlueprintReadWrite)

Definition at line 304 of file ButtonWidget.h.

◆ OnClickEventDelegate

FClickEventDelegate UButtonWidget::OnClickEventDelegate
BlueprintAssignableBlueprintCallable

UPROPERTY(BlueprintAssignable, BlueprintCallable, Category = "Delegate")

Definition at line 151 of file ButtonWidget.h.

◆ OnClickEventPtrDelegate

FClickEventPtrDelegate UButtonWidget::OnClickEventPtrDelegate
BlueprintAssignableBlueprintCallable

UPROPERTY(BlueprintAssignable, BlueprintCallable, Category = "Delegate")

Definition at line 158 of file ButtonWidget.h.

◆ OnClickEventSelfPtrDelegate

FClickEventSelfPtrDelegate UButtonWidget::OnClickEventSelfPtrDelegate
BlueprintAssignableBlueprintCallable

UPROPERTY(BlueprintAssignable, BlueprintCallable, Category = "Delegate")

Definition at line 165 of file ButtonWidget.h.

◆ PressedButtonColor

FLinearColor UButtonWidget::PressedButtonColor = FLinearColor(0.25f, 0.6f, 0.0f, 1.0f)
protectedEditAnywhereBlueprintReadWrite

UPROPERTY(EditAnywhere, BlueprintReadWrite)

Definition at line 290 of file ButtonWidget.h.

◆ SelectedButtonColor

FLinearColor UButtonWidget::SelectedButtonColor = FLinearColor(0.25f, 0.6f, 0.0f, 1.0f)
protectedEditAnywhereBlueprintReadWrite

UPROPERTY(EditAnywhere, BlueprintReadWrite)

Definition at line 269 of file ButtonWidget.h.

◆ SelectedHoveredButtonColor

FLinearColor UButtonWidget::SelectedHoveredButtonColor = FLinearColor(0.25f, 0.6f, 0.0f, 1.0f)
protectedEditAnywhereBlueprintReadWrite

UPROPERTY(EditAnywhere, BlueprintReadWrite)

Definition at line 283 of file ButtonWidget.h.

◆ SelectSound

USoundBase* UButtonWidget::SelectSound
protectedEditAnywhereBlueprintReadWrite

UPROPERTY(EditAnywhere, BlueprintReadWrite)

Definition at line 297 of file ButtonWidget.h.

◆ StoryManager

UStoryManager* UButtonWidget::StoryManager
BlueprintReadWrite

UPROPERTY(BlueprintReadWrite)

Definition at line 177 of file ButtonWidget.h.

◆ Type

ButtonType UButtonWidget::Type
protected

Definition at line 313 of file ButtonWidget.h.


The documentation for this class was generated from the following files: