A Demo Project for the UnrealEngineSDK
Loading...
Searching...
No Matches
UBasicWidget Class Reference

Base class for user widgets in the PixoCore module. More...

#include <BasicWidget.h>

Inheritance diagram for UBasicWidget:
[legend]

Public Member Functions

const FGuid & GetGuid () const
 
const FString & GetWidgetInfoName ()
 UFUNCTION(BlueprintCallable)
 
virtual void Init (UBasicWidgetInfo *WidgetInfo)
 Initializes the widget with the provided widget information.
 
virtual void NativeOnInitialized () override
 
virtual void OnClickExitMenuEvent (FText ButtonName)
 Event handler for the "ExitMenu" button click event.
 
virtual void PlayerWentAwayHandler (const float SquaredDistanceToPlayerCm)
 Handler for when the player goes away.
 
void ProcessSquaredDistanceToPlayer (const float SquaredDistanceToPlayerCm, const float DeltaSec)
 Processes the squared distance to the player.
 
void SetCustomGuid (const FGuid &NewGuid)
 

Public Attributes

FExitMenuEventDelegate OnExitMenuEventDelegate
 Event delegate for the "ExitMenu" event.
 
FOnPlayerWentAway OnPlayerWentAway
 Event for when the player goes away.
 

Protected Member Functions

void PlayerWentAway ()
 UFUNCTION(BlueprintNativeEvent, meta=(DisplayName="PlayerWentAwayHandler"))
 

Protected Attributes

FText Heading = FText::FromString(TEXT("Heading"))
 UPROPERTY(BlueprintReadWrite)
 
float MaxDistanceCalculationDelaySec = 5.0f
 UPROPERTY(BlueprintReadWrite)
 

Private Member Functions

 GENERATED_BODY ()
 

Private Attributes

bool bIsClosingByDistance = false
 Flag indicating if the widget should be closed by distance.
 
float DistanceCalculationDelay = 0.0f
 
int32 MaxSquaredClosingDistance = -1
 
FGuid WidgetGuid
 
FString WidgetInfoName
 Name of widget info used for creating this widget.
 

Detailed Description

Base class for user widgets in the PixoCore module.

UCLASS()

Definition at line 23 of file BasicWidget.h.

Member Function Documentation

◆ GENERATED_BODY()

UBasicWidget::GENERATED_BODY ( )
private

◆ GetGuid()

const FGuid & UBasicWidget::GetGuid ( ) const
inline

Definition at line 47 of file BasicWidget.h.

Here is the caller graph for this function:

◆ GetWidgetInfoName()

const FString & UBasicWidget::GetWidgetInfoName ( )
inlineBlueprintCallable

UFUNCTION(BlueprintCallable)

Definition at line 44 of file BasicWidget.h.

◆ Init()

void UBasicWidget::Init ( UBasicWidgetInfo * WidgetInfo)
virtualBlueprintCallable

Initializes the widget with the provided widget information.

Parameters
WidgetInfoThe widget information.

UFUNCTION(BlueprintCallable)

Reimplemented in UButtonListWidget, and UControlsReminderWidget.

Definition at line 16 of file BasicWidget.cpp.

Here is the caller graph for this function:

◆ NativeOnInitialized()

PRAGMA_DISABLE_OPTIMIZATION void UBasicWidget::NativeOnInitialized ( )
overridevirtual

Reimplemented in UButtonListWidget.

Definition at line 11 of file BasicWidget.cpp.

◆ OnClickExitMenuEvent()

void UBasicWidget::OnClickExitMenuEvent ( FText ButtonName)
virtual

Event handler for the "ExitMenu" button click event.

Parameters
ButtonNameThe name of the clicked button.

UFUNCTION(Category = "Buttons")

Definition at line 51 of file BasicWidget.cpp.

Here is the caller graph for this function:

◆ PlayerWentAway()

void UBasicWidget::PlayerWentAway ( )
protectedBlueprintNativeEvent

UFUNCTION(BlueprintNativeEvent, meta=(DisplayName="PlayerWentAwayHandler"))

◆ PlayerWentAwayHandler()

virtual void UBasicWidget::PlayerWentAwayHandler ( const float SquaredDistanceToPlayerCm)
inlinevirtual

Handler for when the player goes away.

Parameters
SquaredDistanceToPlayerCmThe squared distance to the player in centimeters.

Definition at line 68 of file BasicWidget.h.

Here is the caller graph for this function:

◆ ProcessSquaredDistanceToPlayer()

void UBasicWidget::ProcessSquaredDistanceToPlayer ( const float SquaredDistanceToPlayerCm,
const float DeltaSec )

Processes the squared distance to the player.

Parameters
SquaredDistanceToPlayerCmThe squared distance to the player in centimeters.
DeltaSecThe time elapsed since the last update.

Definition at line 29 of file BasicWidget.cpp.

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

◆ SetCustomGuid()

void UBasicWidget::SetCustomGuid ( const FGuid & NewGuid)
inline

Definition at line 46 of file BasicWidget.h.

Here is the caller graph for this function:

Member Data Documentation

◆ bIsClosingByDistance

bool UBasicWidget::bIsClosingByDistance = false
private

Flag indicating if the widget should be closed by distance.

Definition at line 106 of file BasicWidget.h.

◆ DistanceCalculationDelay

float UBasicWidget::DistanceCalculationDelay = 0.0f
private

Definition at line 108 of file BasicWidget.h.

◆ Heading

FText UBasicWidget::Heading = FText::FromString(TEXT("Heading"))
protectedBlueprintReadWrite

UPROPERTY(BlueprintReadWrite)

Heading of the widget

Definition at line 94 of file BasicWidget.h.

◆ MaxDistanceCalculationDelaySec

float UBasicWidget::MaxDistanceCalculationDelaySec = 5.0f
protectedBlueprintReadWrite

UPROPERTY(BlueprintReadWrite)

How frequently should we check closing distance.

Definition at line 99 of file BasicWidget.h.

◆ MaxSquaredClosingDistance

int32 UBasicWidget::MaxSquaredClosingDistance = -1
private

Definition at line 107 of file BasicWidget.h.

◆ OnExitMenuEventDelegate

FExitMenuEventDelegate UBasicWidget::OnExitMenuEventDelegate

Event delegate for the "ExitMenu" event.

Todo
Investigate and probably remove because not all widgets have exit.

Definition at line 86 of file BasicWidget.h.

◆ OnPlayerWentAway

FOnPlayerWentAway UBasicWidget::OnPlayerWentAway

Event for when the player goes away.

Definition at line 87 of file BasicWidget.h.

◆ WidgetGuid

FGuid UBasicWidget::WidgetGuid
private

Definition at line 103 of file BasicWidget.h.

◆ WidgetInfoName

FString UBasicWidget::WidgetInfoName
private

Name of widget info used for creating this widget.

Definition at line 102 of file BasicWidget.h.


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