|
|
|
|
| #pragma once
|
|
|
| #include "Components/GameStateComponent.h"
|
| #include "ControlFlowNode.h"
|
| #include "LoadingProcessInterface.h"
|
|
|
| #include "LyraFrontendStateComponent.generated.h"
|
|
|
| class FControlFlow;
|
| class FString;
|
| class FText;
|
| class UObject;
|
| struct FFrame;
|
|
|
| enum class ECommonUserOnlineContext : uint8;
|
| enum class ECommonUserPrivilege : uint8;
|
| class UCommonActivatableWidget;
|
| class UCommonUserInfo;
|
| class ULyraExperienceDefinition;
|
|
|
| UCLASS(Abstract)
|
| class ULyraFrontendStateComponent : public UGameStateComponent, public ILoadingProcessInterface
|
| {
|
| GENERATED_BODY()
|
|
|
| public:
|
|
|
| ULyraFrontendStateComponent(const FObjectInitializer& ObjectInitializer = FObjectInitializer::Get());
|
|
|
|
|
| virtual void BeginPlay() override;
|
| virtual void EndPlay(const EEndPlayReason::Type EndPlayReason) override;
|
|
|
|
|
|
|
| virtual bool ShouldShowLoadingScreen(FString& OutReason) const override;
|
|
|
|
|
| private:
|
| void OnExperienceLoaded(const ULyraExperienceDefinition* Experience);
|
|
|
| UFUNCTION()
|
| void OnUserInitialized(const UCommonUserInfo* UserInfo, bool bSuccess, FText Error, ECommonUserPrivilege RequestedPrivilege, ECommonUserOnlineContext OnlineContext);
|
|
|
| void FlowStep_WaitForUserInitialization(FControlFlowNodeRef SubFlow);
|
| void FlowStep_TryShowPressStartScreen(FControlFlowNodeRef SubFlow);
|
| void FlowStep_TryJoinRequestedSession(FControlFlowNodeRef SubFlow);
|
| void FlowStep_TryShowMainScreen(FControlFlowNodeRef SubFlow);
|
|
|
| bool bShouldShowLoadingScreen = true;
|
|
|
| UPROPERTY(EditAnywhere, Category = UI)
|
| TSoftClassPtr<UCommonActivatableWidget> PressStartScreenClass;
|
|
|
| UPROPERTY(EditAnywhere, Category = UI)
|
| TSoftClassPtr<UCommonActivatableWidget> MainScreenClass;
|
|
|
| TSharedPtr<FControlFlow> FrontEndFlow;
|
|
|
|
|
| FControlFlowNodePtr InProgressPressStartScreen;
|
|
|
| FDelegateHandle OnJoinSessionCompleteEventHandle;
|
| };
|
|
|