Add SaveGameButton OnClick functionality
This commit is contained in:
parent
6e822f88b0
commit
6a494261d7
BIN
Content/UI/LoadGame/BP_SaveGameEntryTemplate.uasset (Stored with Git LFS)
BIN
Content/UI/LoadGame/BP_SaveGameEntryTemplate.uasset (Stored with Git LFS)
Binary file not shown.
BIN
Content/UI/Pause/PauseMenu.uasset (Stored with Git LFS)
BIN
Content/UI/Pause/PauseMenu.uasset (Stored with Git LFS)
Binary file not shown.
|
@ -3,6 +3,7 @@
|
||||||
|
|
||||||
#include "PauseUIWidget.h"
|
#include "PauseUIWidget.h"
|
||||||
|
|
||||||
|
#include "NakatomiGameInstance.h"
|
||||||
#include "Blueprint/WidgetBlueprintLibrary.h"
|
#include "Blueprint/WidgetBlueprintLibrary.h"
|
||||||
#include "Kismet/GameplayStatics.h"
|
#include "Kismet/GameplayStatics.h"
|
||||||
|
|
||||||
|
@ -105,7 +106,12 @@ void UPauseUIWidget::OptionsButtonOnClicked()
|
||||||
|
|
||||||
void UPauseUIWidget::SaveButtonOnClicked()
|
void UPauseUIWidget::SaveButtonOnClicked()
|
||||||
{
|
{
|
||||||
// TODO: Implement Functionality
|
UNakatomiGameInstance* gameInstance = Cast<UNakatomiGameInstance>(UGameplayStatics::GetGameInstance(GetWorld()));
|
||||||
|
|
||||||
|
if (gameInstance->SaveGame())
|
||||||
|
{
|
||||||
|
PlayAnimation(SaveConfirmedAnimation, 0.0f, 1, EUMGSequencePlayMode::Forward, 1.0f);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void UPauseUIWidget::QuitButtonOnClicked()
|
void UPauseUIWidget::QuitButtonOnClicked()
|
||||||
|
|
|
@ -36,6 +36,12 @@ public:
|
||||||
UPROPERTY(BlueprintReadWrite, meta = (BindWidget))
|
UPROPERTY(BlueprintReadWrite, meta = (BindWidget))
|
||||||
UTextBlock* SaveTextBlock;
|
UTextBlock* SaveTextBlock;
|
||||||
|
|
||||||
|
UPROPERTY(BlueprintReadWrite, meta = (BindWidget))
|
||||||
|
UTextBlock* SaveConfirmedTextBlock;
|
||||||
|
|
||||||
|
UPROPERTY(Transient, meta = (BindWidgetAnim))
|
||||||
|
UWidgetAnimation* SaveConfirmedAnimation;
|
||||||
|
|
||||||
UPROPERTY(BlueprintReadWrite, meta = (BindWidget))
|
UPROPERTY(BlueprintReadWrite, meta = (BindWidget))
|
||||||
UButton* QuitButton;
|
UButton* QuitButton;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue