diff --git a/Content/Blueprints/Game/BP_MenuGameMode.uasset b/Content/Blueprints/Game/BP_MenuGameMode.uasset index 0d3830d3..98562a3c 100644 Binary files a/Content/Blueprints/Game/BP_MenuGameMode.uasset and b/Content/Blueprints/Game/BP_MenuGameMode.uasset differ diff --git a/Content/DedicatedServers/Portal/BP_PortalHUD.uasset b/Content/DedicatedServers/Portal/BP_PortalHUD.uasset new file mode 100644 index 00000000..9636ef07 Binary files /dev/null and b/Content/DedicatedServers/Portal/BP_PortalHUD.uasset differ diff --git a/Content/DedicatedServers/Portal/BP_PortalManager.uasset b/Content/DedicatedServers/Portal/BP_PortalManager.uasset new file mode 100644 index 00000000..cacf2104 Binary files /dev/null and b/Content/DedicatedServers/Portal/BP_PortalManager.uasset differ diff --git a/Content/DedicatedServers/Portal/WBP_JoinGame.uasset b/Content/DedicatedServers/Portal/WBP_JoinGame.uasset new file mode 100644 index 00000000..af206090 Binary files /dev/null and b/Content/DedicatedServers/Portal/WBP_JoinGame.uasset differ diff --git a/Content/DedicatedServers/Portal/WBP_SignInOverlay.uasset b/Content/DedicatedServers/Portal/WBP_SignInOverlay.uasset new file mode 100644 index 00000000..01e0b598 Binary files /dev/null and b/Content/DedicatedServers/Portal/WBP_SignInOverlay.uasset differ diff --git a/Source/DedicatedServers/Private/UI/API/GameSessions/JoinGame.cpp b/Source/DedicatedServers/Private/UI/API/GameSessions/JoinGame.cpp new file mode 100644 index 00000000..e90b2304 --- /dev/null +++ b/Source/DedicatedServers/Private/UI/API/GameSessions/JoinGame.cpp @@ -0,0 +1,4 @@ +// Fill out your copyright notice in the Description page of Project Settings. + + +#include "UI/API/GameSessions/JoinGame.h" diff --git a/Source/DedicatedServers/Private/UI/Portal/PortalHUD.cpp b/Source/DedicatedServers/Private/UI/Portal/PortalHUD.cpp new file mode 100644 index 00000000..5f30606f --- /dev/null +++ b/Source/DedicatedServers/Private/UI/Portal/PortalHUD.cpp @@ -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(OwningPlayerController, SignInOverlayClass); + if (IsValid(SignInOverlay)) + { + SignInOverlay->AddToViewport(); + } + + const FInputModeGameAndUI InputModeData; + OwningPlayerController->SetInputMode(InputModeData); + OwningPlayerController->SetShowMouseCursor(true); + +} diff --git a/Source/DedicatedServers/Private/UI/Portal/PortalManager.cpp b/Source/DedicatedServers/Private/UI/Portal/PortalManager.cpp new file mode 100644 index 00000000..eb3c4197 --- /dev/null +++ b/Source/DedicatedServers/Private/UI/Portal/PortalManager.cpp @@ -0,0 +1,4 @@ +// Fill out your copyright notice in the Description page of Project Settings. + + +#include "UI/Portal/PortalManager.h" diff --git a/Source/DedicatedServers/Private/UI/Portal/SignIn/SignInOverlay.cpp b/Source/DedicatedServers/Private/UI/Portal/SignIn/SignInOverlay.cpp new file mode 100644 index 00000000..b6586a6c --- /dev/null +++ b/Source/DedicatedServers/Private/UI/Portal/SignIn/SignInOverlay.cpp @@ -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(PortalManagerClass); +} diff --git a/Source/DedicatedServers/Public/UI/API/GameSessions/JoinGame.h b/Source/DedicatedServers/Public/UI/API/GameSessions/JoinGame.h new file mode 100644 index 00000000..e9d6d044 --- /dev/null +++ b/Source/DedicatedServers/Public/UI/API/GameSessions/JoinGame.h @@ -0,0 +1,27 @@ +// Fill out your copyright notice in the Description page of Project Settings. + +#pragma once + +#include "CoreMinimal.h" +#include "Blueprint/UserWidget.h" +#include "JoinGame.generated.h" + +class UButton; +class UTextBlock; + +/** + * + */ +UCLASS() +class DEDICATEDSERVERS_API UJoinGame : public UUserWidget +{ + GENERATED_BODY() + +public: + + UPROPERTY(meta = (BindWidget)) + TObjectPtr Button_JoinGame; + + UPROPERTY(meta = (BindWidget)) + TObjectPtr TextBlock_StatusMessage; +}; diff --git a/Source/DedicatedServers/Public/UI/Portal/PortalHUD.h b/Source/DedicatedServers/Public/UI/Portal/PortalHUD.h new file mode 100644 index 00000000..c534ce0c --- /dev/null +++ b/Source/DedicatedServers/Public/UI/Portal/PortalHUD.h @@ -0,0 +1,32 @@ +// Fill out your copyright notice in the Description page of Project Settings. + +#pragma once + +#include "CoreMinimal.h" +#include "GameFramework/HUD.h" +#include "PortalHUD.generated.h" + +class USignInOverlay; + +/** + * + */ +UCLASS() +class DEDICATEDSERVERS_API APortalHUD : public AHUD +{ + GENERATED_BODY() + +public: + + UPROPERTY(EditDefaultsOnly) + TSubclassOf SignInOverlayClass; + +protected: + + virtual void BeginPlay() override; + +private: + + UPROPERTY() + TObjectPtr SignInOverlay; +}; diff --git a/Source/DedicatedServers/Public/UI/Portal/PortalManager.h b/Source/DedicatedServers/Public/UI/Portal/PortalManager.h new file mode 100644 index 00000000..8684744e --- /dev/null +++ b/Source/DedicatedServers/Public/UI/Portal/PortalManager.h @@ -0,0 +1,16 @@ +// Fill out your copyright notice in the Description page of Project Settings. + +#pragma once + +#include "CoreMinimal.h" +#include "UI/HTTP/HTTPRequestManager.h" +#include "PortalManager.generated.h" + +/** + * + */ +UCLASS() +class DEDICATEDSERVERS_API UPortalManager : public UHTTPRequestManager +{ + GENERATED_BODY() +}; diff --git a/Source/DedicatedServers/Public/UI/Portal/SignIn/SignInOverlay.h b/Source/DedicatedServers/Public/UI/Portal/SignIn/SignInOverlay.h new file mode 100644 index 00000000..a49673fa --- /dev/null +++ b/Source/DedicatedServers/Public/UI/Portal/SignIn/SignInOverlay.h @@ -0,0 +1,36 @@ +// Fill out your copyright notice in the Description page of Project Settings. + +#pragma once + +#include "CoreMinimal.h" +#include "Blueprint/UserWidget.h" +#include "SignInOverlay.generated.h" + +class UJoinGame; +class UPortalManager; + +/** + * + */ +UCLASS() +class DEDICATEDSERVERS_API USignInOverlay : public UUserWidget +{ + GENERATED_BODY() + +public: + + UPROPERTY(meta = (BindWidget)) + TObjectPtr JoinGameWidget; + + UPROPERTY(EditDefaultsOnly) + TSubclassOf PortalManagerClass; + + +protected: + + virtual void NativeConstruct() override; +private: + + UPROPERTY() + TObjectPtr PortalManager; +};