Add LoadGameWidget functionality to MainMenuUIWidget
This commit is contained in:
parent
0a302a8efa
commit
d248c90780
|
@ -5,6 +5,7 @@
|
|||
|
||||
#include "Blueprint/WidgetBlueprintLibrary.h"
|
||||
#include "Kismet/GameplayStatics.h"
|
||||
#include "UI/LoadGameUserWidget.h"
|
||||
|
||||
void UMainMenuUIWidget::NativeConstruct()
|
||||
{
|
||||
|
@ -84,7 +85,13 @@ void UMainMenuUIWidget::NewGameButtonOnClicked()
|
|||
|
||||
void UMainMenuUIWidget::LoadGameButtonOnClicked()
|
||||
{
|
||||
// TODO: Implement Functionality
|
||||
if (LoadGameMenuWidget)
|
||||
{
|
||||
currentLoadGameWidget = CreateWidget<ULoadGameUserWidget>(GetWorld(), LoadGameMenuWidget);
|
||||
currentLoadGameWidget->AddToViewport();
|
||||
currentLoadGameWidget->SetReturnScreen(this);
|
||||
this->RemoveFromParent();
|
||||
}
|
||||
}
|
||||
|
||||
void UMainMenuUIWidget::OptionsButtonOnClicked()
|
||||
|
|
|
@ -6,6 +6,7 @@
|
|||
#include "OptionsUIWidget.h"
|
||||
#include "Blueprint/UserWidget.h"
|
||||
#include "Components/Button.h"
|
||||
#include "UI/LoadGameUserWidget.h"
|
||||
#include "UI/NakatomiInteractiveWidget.h"
|
||||
#include "MainMenuUIWidget.generated.h"
|
||||
|
||||
|
@ -57,7 +58,7 @@ public:
|
|||
private:
|
||||
UUserWidget* currentNewGameWidget;
|
||||
|
||||
UUserWidget* currentLoadGameWidget;
|
||||
ULoadGameUserWidget* currentLoadGameWidget;
|
||||
|
||||
UOptionsUIWidget* currentOptionsMenuWidget;
|
||||
|
||||
|
|
Loading…
Reference in New Issue