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..c7f1fc39 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..485b3f09 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..6b98dde1 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..c3bad5f4 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..b606d3df --- /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..4ccd22ac --- /dev/null +++ b/Source/DedicatedServers/Private/UI/Portal/PortalHUD.cpp @@ -0,0 +1,24 @@ +// 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(); + } + + 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..5723e91b --- /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..f7e446ce --- /dev/null +++ b/Source/DedicatedServers/Private/UI/Portal/Signin/SignInOverlay.cpp @@ -0,0 +1,16 @@ +// Fill out your copyright notice in the Description page of Project Settings. + + +#include "UI/Portal/Signin/SignInOverlay.h" + +#include "Components/Button.h" +#include "UI/API/GameSessions/JoinGame.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..b8db1ad0 --- /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..1feb8f57 --- /dev/null +++ b/Source/DedicatedServers/Public/UI/Portal/PortalHUD.h @@ -0,0 +1,30 @@ +// Fill out your copyright notice in the Description page of Project Settings. + +#pragma once + +class USignInOverlay; + +#include "CoreMinimal.h" +#include "GameFramework/HUD.h" +#include "PortalHUD.generated.h" + +/** + * + */ +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..549d2299 --- /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..b162cece --- /dev/null +++ b/Source/DedicatedServers/Public/UI/Portal/Signin/SignInOverlay.h @@ -0,0 +1,37 @@ +// Fill out your copyright notice in the Description page of Project Settings. + +#pragma once + +class UJoinGame; + +#include "CoreMinimal.h" +#include "Blueprint/UserWidget.h" +#include "SignInOverlay.generated.h" + +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; +};