Add MVP main menu placeholder
This commit is contained in:
@@ -7,6 +7,7 @@
|
||||
#include "AgrarianGameCharacter.h"
|
||||
#include "AgrarianInventoryComponent.h"
|
||||
#include "AgrarianItemPickup.h"
|
||||
#include "AgrarianMvpFrontendWidget.h"
|
||||
#include "AgrarianPersistenceSubsystem.h"
|
||||
#include "AgrarianShelterActor.h"
|
||||
#include "AgrarianSurvivalComponent.h"
|
||||
@@ -77,6 +78,21 @@ void AAgrarianGamePlayerController::BeginPlay()
|
||||
{
|
||||
Super::BeginPlay();
|
||||
|
||||
if (IsLocalPlayerController())
|
||||
{
|
||||
if (!MvpFrontendWidgetClass)
|
||||
{
|
||||
MvpFrontendWidgetClass = UAgrarianMvpFrontendWidget::StaticClass();
|
||||
}
|
||||
|
||||
MvpFrontendWidget = CreateWidget<UAgrarianMvpFrontendWidget>(this, MvpFrontendWidgetClass);
|
||||
if (MvpFrontendWidget)
|
||||
{
|
||||
MvpFrontendWidget->SetActiveScreen(EAgrarianMvpFrontendScreen::MainMenu);
|
||||
MvpFrontendWidget->AddToPlayerScreen(10);
|
||||
}
|
||||
}
|
||||
|
||||
// only spawn touch controls on local player controllers
|
||||
if (ShouldUseTouchControls() && IsLocalPlayerController())
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user