Custom widget class representing a list of buttons.
More...
#include <ButtonListWidget.h>
|
const FGuid & | GetGuid () const |
|
const FString & | GetWidgetInfoName () |
| UFUNCTION(BlueprintCallable)
|
|
virtual void | Init (UBasicWidgetInfo *WidgetInfo) override |
| 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.
|
|
virtual void | SelectButtonEvent (FText SelectedButtonName) |
| Selects a button by its name and deselects other buttons.
|
|
void | SetCustomGuid (const FGuid &NewGuid) |
|
virtual void | SpawnButtons (const UDataTable *DTButtonsList) |
| Spawns buttons based on the provided data table.
|
|
|
virtual void | OnClickConfirmEvent (FText ButtonName) |
| Event called when the confirm button is clicked.
|
|
void | PlayerWentAway () |
| UFUNCTION(BlueprintNativeEvent, meta=(DisplayName="PlayerWentAwayHandler"))
|
|
virtual void | SpawnButtonInstance (FText ButtonName, bool Checked) |
| Spawns an instance of a button with the specified name.
|
|
|
FMargin | ButtonPadding = {0.0, 10.0, 0.0, 10.0} |
| UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Buttons")
|
|
TArray< UButtonWidget * > | ButtonsArray |
| Holds all buttons which were spawned from Data Table.
|
|
TSubclassOf< class UButtonWidget > | ButtonWidgetClass |
| The class that will be used to spawning the buttons.
|
|
TSubclassOf< class UButtonWidget > | CheckButtonWidgetClass |
| UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Buttons")
|
|
UButtonWidget * | ConfirmButton |
| UPROPERTY(BlueprintReadOnly, Category = "Buttons", meta = (BindWidget))
|
|
FText | Heading = FText::FromString(TEXT("Heading")) |
| UPROPERTY(BlueprintReadWrite)
|
|
float | MaxDistanceCalculationDelaySec = 5.0f |
| UPROPERTY(BlueprintReadWrite)
|
|
UButtonWidget * | SelectedButton |
| Holds the last selected button.
|
|
TSet< FString > | SelectedButtonsLabels |
|
UVerticalBox * | VerticalBoxButtons |
| UPROPERTY(BlueprintReadOnly, meta = (BindWidget))
|
|
Custom widget class representing a list of buttons.
UCLASS()
Definition at line 18 of file ButtonListWidget.h.
◆ GENERATED_BODY()
UButtonListWidget::GENERATED_BODY |
( |
| ) |
|
|
private |
◆ GetGuid()
const FGuid & UBasicWidget::GetGuid |
( |
| ) |
const |
|
inlineinherited |
◆ GetWidgetInfoName()
const FString & UBasicWidget::GetWidgetInfoName |
( |
| ) |
|
|
inlineinheritedBlueprintCallable |
◆ Init()
Initializes the widget with the provided widget information.
- Parameters
-
WidgetInfo | The widget information. |
UFUNCTION(BlueprintCallable)
Reimplemented from UBasicWidget.
Definition at line 19 of file ButtonListWidget.cpp.
◆ NativeOnInitialized()
void UButtonListWidget::NativeOnInitialized |
( |
| ) |
|
|
overridevirtual |
◆ OnClickConfirmEvent()
void UButtonListWidget::OnClickConfirmEvent |
( |
FText | ButtonName | ) |
|
|
protectedvirtual |
Event called when the confirm button is clicked.
- Parameters
-
ButtonName | The name of the button that was clicked. |
UFUNCTION(Category = "Buttons")
Definition at line 34 of file ButtonListWidget.cpp.
◆ OnClickExitMenuEvent()
void UBasicWidget::OnClickExitMenuEvent |
( |
FText | ButtonName | ) |
|
|
virtualinherited |
Event handler for the "ExitMenu" button click event.
- Parameters
-
ButtonName | The name of the clicked button. |
UFUNCTION(Category = "Buttons")
Definition at line 51 of file BasicWidget.cpp.
◆ PlayerWentAway()
void UBasicWidget::PlayerWentAway |
( |
| ) |
|
|
protectedinheritedBlueprintNativeEvent |
UFUNCTION(BlueprintNativeEvent, meta=(DisplayName="PlayerWentAwayHandler"))
◆ PlayerWentAwayHandler()
virtual void UBasicWidget::PlayerWentAwayHandler |
( |
const float | SquaredDistanceToPlayerCm | ) |
|
|
inlinevirtualinherited |
Handler for when the player goes away.
- Parameters
-
SquaredDistanceToPlayerCm | The squared distance to the player in centimeters. |
Definition at line 68 of file BasicWidget.h.
◆ ProcessSquaredDistanceToPlayer()
void UBasicWidget::ProcessSquaredDistanceToPlayer |
( |
const float | SquaredDistanceToPlayerCm, |
|
|
const float | DeltaSec ) |
|
inherited |
Processes the squared distance to the player.
- Parameters
-
SquaredDistanceToPlayerCm | The squared distance to the player in centimeters. |
DeltaSec | The time elapsed since the last update. |
Definition at line 29 of file BasicWidget.cpp.
◆ SelectButtonEvent()
void UButtonListWidget::SelectButtonEvent |
( |
FText | SelectedButtonName | ) |
|
|
virtualBlueprintCallable |
Selects a button by its name and deselects other buttons.
- Parameters
-
SelectedButtonName | The name of the selected button. |
UFUNCTION(BlueprintCallable, Category = "Buttons")
Definition at line 52 of file ButtonListWidget.cpp.
◆ SetCustomGuid()
void UBasicWidget::SetCustomGuid |
( |
const FGuid & | NewGuid | ) |
|
|
inlineinherited |
◆ SpawnButtonInstance()
void UButtonListWidget::SpawnButtonInstance |
( |
FText | ButtonName, |
|
|
bool | Checked ) |
|
protectedvirtualBlueprintCallable |
Spawns an instance of a button with the specified name.
- Parameters
-
ButtonName | The name of the button to spawn. |
Checked | Indicates if the button should be checked. |
UFUNCTION(BlueprintCallable, Category = "Buttons")
Definition at line 94 of file ButtonListWidget.cpp.
◆ SpawnButtons()
void UButtonListWidget::SpawnButtons |
( |
const UDataTable * | DTButtonsList | ) |
|
|
virtualBlueprintCallable |
Spawns buttons based on the provided data table.
- Parameters
-
DTButtonsList | The data table containing button information. |
UFUNCTION(BlueprintCallable, Category = "Buttons")
Definition at line 81 of file ButtonListWidget.cpp.
◆ bConfirmSelection
bool UButtonListWidget::bConfirmSelection |
|
private |
Should we check for any selected option before accept confirmation.
Definition at line 125 of file ButtonListWidget.h.
◆ bIsClosingByDistance
bool UBasicWidget::bIsClosingByDistance = false |
|
privateinherited |
Flag indicating if the widget should be closed by distance.
Definition at line 106 of file BasicWidget.h.
◆ ButtonPadding
FMargin UButtonListWidget::ButtonPadding = {0.0, 10.0, 0.0, 10.0} |
|
protectedBlueprintReadWriteEditAnywhere |
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Buttons")
Definition at line 112 of file ButtonListWidget.h.
◆ ButtonsArray
|
protectedBlueprintReadWrite |
Holds all buttons which were spawned from Data Table.
UPROPERTY(BlueprintReadWrite, Category = "Buttons")
Definition at line 90 of file ButtonListWidget.h.
◆ ButtonWidgetClass
TSubclassOf<class UButtonWidget> UButtonListWidget::ButtonWidgetClass |
|
protectedBlueprintReadWriteEditAnywhere |
The class that will be used to spawning the buttons.
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Buttons")
Definition at line 98 of file ButtonListWidget.h.
◆ CheckButtonWidgetClass
TSubclassOf<class UButtonWidget> UButtonListWidget::CheckButtonWidgetClass |
|
protectedBlueprintReadWriteEditAnywhere |
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Buttons")
Definition at line 105 of file ButtonListWidget.h.
◆ ConfirmButton
|
protectedBlueprintReadOnly |
UPROPERTY(BlueprintReadOnly, Category = "Buttons", meta = (BindWidget))
Definition at line 77 of file ButtonListWidget.h.
◆ DistanceCalculationDelay
float UBasicWidget::DistanceCalculationDelay = 0.0f |
|
privateinherited |
◆ Heading
FText UBasicWidget::Heading = FText::FromString(TEXT("Heading")) |
|
protectedinheritedBlueprintReadWrite |
UPROPERTY(BlueprintReadWrite)
Heading of the widget
Definition at line 94 of file BasicWidget.h.
◆ MaxDistanceCalculationDelaySec
float UBasicWidget::MaxDistanceCalculationDelaySec = 5.0f |
|
protectedinheritedBlueprintReadWrite |
UPROPERTY(BlueprintReadWrite)
How frequently should we check closing distance.
Definition at line 99 of file BasicWidget.h.
◆ MaxSquaredClosingDistance
int32 UBasicWidget::MaxSquaredClosingDistance = -1 |
|
privateinherited |
◆ OnConfirmEventDelegate
FConfirmEventDelegate UButtonListWidget::OnConfirmEventDelegate |
◆ OnExitMenuEventDelegate
FExitMenuEventDelegate UBasicWidget::OnExitMenuEventDelegate |
|
inherited |
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 |
|
inherited |
Event for when the player goes away.
Definition at line 87 of file BasicWidget.h.
◆ SelectedButton
|
protectedBlueprintReadWrite |
Holds the last selected button.
UPROPERTY(BlueprintReadWrite, Category = "Buttons")
Definition at line 119 of file ButtonListWidget.h.
◆ SelectedButtonsLabels
TSet<FString> UButtonListWidget::SelectedButtonsLabels |
|
protected |
◆ VerticalBoxButtons
UVerticalBox* UButtonListWidget::VerticalBoxButtons |
|
protectedBlueprintReadOnly |
◆ WidgetGuid
FGuid UBasicWidget::WidgetGuid |
|
privateinherited |
◆ WidgetInfoName
FString UBasicWidget::WidgetInfoName |
|
privateinherited |
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: