Lesson 67 - Portal Setup
This commit is contained in:
@@ -0,0 +1,4 @@
|
||||
// Fill out your copyright notice in the Description page of Project Settings.
|
||||
|
||||
|
||||
#include "UI/API/GameSessions/JoinGame.h"
|
||||
23
Source/DedicatedServers/Private/UI/Portal/PortalHUD.cpp
Normal file
23
Source/DedicatedServers/Private/UI/Portal/PortalHUD.cpp
Normal file
@@ -0,0 +1,23 @@
|
||||
// Fill out your copyright notice in the Description page of Project Settings.
|
||||
|
||||
|
||||
#include "UI/Portal/PortalHUD.h"
|
||||
#include "UI/Portal/SignIn/SignInOverlay.h"
|
||||
#include "Blueprint/UserWidget.h"
|
||||
|
||||
void APortalHUD::BeginPlay()
|
||||
{
|
||||
Super::BeginPlay();
|
||||
|
||||
APlayerController* OwningPlayerController = GetOwningPlayerController();
|
||||
SignInOverlay = CreateWidget<USignInOverlay>(OwningPlayerController, SignInOverlayClass);
|
||||
if (IsValid(SignInOverlay))
|
||||
{
|
||||
SignInOverlay->AddToViewport();
|
||||
}
|
||||
|
||||
const FInputModeGameAndUI InputModeData;
|
||||
OwningPlayerController->SetInputMode(InputModeData);
|
||||
OwningPlayerController->SetShowMouseCursor(true);
|
||||
|
||||
}
|
||||
@@ -0,0 +1,4 @@
|
||||
// Fill out your copyright notice in the Description page of Project Settings.
|
||||
|
||||
|
||||
#include "UI/Portal/PortalManager.h"
|
||||
@@ -0,0 +1,14 @@
|
||||
// Fill out your copyright notice in the Description page of Project Settings.
|
||||
|
||||
|
||||
#include "UI/Portal/SignIn/SignInOverlay.h"
|
||||
|
||||
#include "UI/Portal/PortalManager.h"
|
||||
|
||||
void USignInOverlay::NativeConstruct()
|
||||
{
|
||||
Super::NativeConstruct();
|
||||
check(PortalManagerClass);
|
||||
|
||||
PortalManager = NewObject<UPortalManager>(PortalManagerClass);
|
||||
}
|
||||
Reference in New Issue
Block a user