Create PauseUIWidget

This commit is contained in:
baz 2023-10-01 23:51:53 +01:00
parent d6f89e259f
commit 149de8788f
2 changed files with 92 additions and 0 deletions

View File

@ -0,0 +1,41 @@
// Fill out your copyright notice in the Description page of Project Settings.
#include "PauseUIWidget.h"
void UPauseUIWidget::NativeConstruct()
{
Super::NativeConstruct();
ResumeButton->OnClicked.AddUniqueDynamic(this, &UPauseUIWidget::ResumeButtonOnClicked);
OptionsButton->OnClicked.AddUniqueDynamic(this, &UPauseUIWidget::OptionsButtonOnClicked);
SaveButton->OnClicked.AddUniqueDynamic(this, &UPauseUIWidget::SaveButtonOnClicked);
QuitButton->OnClicked.AddUniqueDynamic(this, &UPauseUIWidget::QuitButtonOnClicked);
CloseApplicationButton->OnClicked.AddUniqueDynamic(this, &UPauseUIWidget::CloseApplicationButtonOnClicked);
}
void UPauseUIWidget::ResumeButtonOnClicked()
{
// TODO: Implement Functionality
}
void UPauseUIWidget::OptionsButtonOnClicked()
{
// TODO: Implement Functionality
}
void UPauseUIWidget::SaveButtonOnClicked()
{
// TODO: Implement Functionality
}
void UPauseUIWidget::QuitButtonOnClicked()
{
// TODO: Implement Functionality
}
void UPauseUIWidget::CloseApplicationButtonOnClicked()
{
// TODO: Implement Functionality
}

View File

@ -0,0 +1,51 @@
// Fill out your copyright notice in the Description page of Project Settings.
#pragma once
#include "CoreMinimal.h"
#include "Blueprint/UserWidget.h"
#include "Components/Button.h"
#include "Components/VerticalBox.h"
#include "PauseUIWidget.generated.h"
/**
*
*/
UCLASS()
class NAKATOMI_API UPauseUIWidget : public UUserWidget
{
GENERATED_BODY()
public:
UPROPERTY(BlueprintReadWrite, meta = (BindWidget))
UVerticalBox* VerticalBox;
UPROPERTY(BlueprintReadWrite, meta = (BindWidget))
UButton* ResumeButton;
UPROPERTY(BlueprintReadWrite, meta = (BindWidget))
UButton* OptionsButton;
UPROPERTY(BlueprintReadWrite, meta = (BindWidget))
UButton* SaveButton;
UPROPERTY(BlueprintReadWrite, meta = (BindWidget))
UButton* QuitButton;
UPROPERTY(BlueprintReadWrite, meta = (BindWidget))
UButton* CloseApplicationButton;
public:
virtual void NativeConstruct() override;
private:
void ResumeButtonOnClicked();
void OptionsButtonOnClicked();
void SaveButtonOnClicked();
void QuitButtonOnClicked();
void CloseApplicationButtonOnClicked();
};