File size: 1,387 Bytes
7fd553e | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 | // Copyright Epic Games, Inc. All Rights Reserved.
#pragma once
#include "Subsystems/GameInstanceSubsystem.h"
#include "Templates/SubclassOf.h"
#include "UObject/WeakObjectPtr.h"
#include "LyraLoadingScreenSubsystem.generated.h"
#define UE_API LYRAGAME_API
class UObject;
class UUserWidget;
struct FFrame;
DECLARE_DYNAMIC_MULTICAST_DELEGATE_OneParam(FLoadingScreenWidgetChangedDelegate, TSubclassOf<UUserWidget>, NewWidgetClass);
/**
* Tracks/stores the current loading screen configuration in a place
* that persists across map transitions
*/
UCLASS(MinimalAPI)
class ULyraLoadingScreenSubsystem : public UGameInstanceSubsystem
{
GENERATED_BODY()
public:
UE_API ULyraLoadingScreenSubsystem();
// Sets the loading screen widget class to display inside of the loading screen widget host
UFUNCTION(BlueprintCallable)
UE_API void SetLoadingScreenContentWidget(TSubclassOf<UUserWidget> NewWidgetClass);
// Returns the last set loading screen widget class to display inside of the loading screen widget host
UFUNCTION(BlueprintPure)
UE_API TSubclassOf<UUserWidget> GetLoadingScreenContentWidget() const;
private:
UPROPERTY(BlueprintAssignable, meta=(AllowPrivateAccess))
FLoadingScreenWidgetChangedDelegate OnLoadingScreenWidgetChanged;
UPROPERTY()
TSubclassOf<UUserWidget> LoadingScreenWidgetClass;
};
#undef UE_API
|