2022-05-23 18:41:30 +00:00
|
|
|
// Copyright Epic Games, Inc. All Rights Reserved.
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
2022-09-13 07:18:28 +00:00
|
|
|
#include "Delegates/Delegate.h"
|
2022-05-23 18:41:30 +00:00
|
|
|
#include "Engine/CancellableAsyncAction.h"
|
2022-09-13 07:18:28 +00:00
|
|
|
#include "GameplayTagContainer.h"
|
|
|
|
#include "Templates/SharedPointer.h"
|
|
|
|
#include "UObject/SoftObjectPtr.h"
|
|
|
|
#include "UObject/UObjectGlobals.h"
|
|
|
|
#include "UObject/WeakObjectPtrTemplates.h"
|
2022-05-23 18:41:30 +00:00
|
|
|
|
|
|
|
#include "AsyncAction_PushContentToLayerForPlayer.generated.h"
|
|
|
|
|
2022-09-13 07:18:28 +00:00
|
|
|
class APlayerController;
|
|
|
|
class UCommonActivatableWidget;
|
|
|
|
class UObject;
|
|
|
|
struct FFrame;
|
|
|
|
struct FStreamableHandle;
|
2022-05-23 18:41:30 +00:00
|
|
|
|
|
|
|
DECLARE_DYNAMIC_MULTICAST_DELEGATE_OneParam(FPushContentToLayerForPlayerAsyncDelegate, UCommonActivatableWidget*, UserWidget);
|
|
|
|
|
|
|
|
/**
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
UCLASS(BlueprintType)
|
|
|
|
class COMMONGAME_API UAsyncAction_PushContentToLayerForPlayer : public UCancellableAsyncAction
|
|
|
|
{
|
|
|
|
GENERATED_UCLASS_BODY()
|
|
|
|
|
|
|
|
public:
|
|
|
|
virtual void Cancel() override;
|
|
|
|
|
|
|
|
UFUNCTION(BlueprintCallable, BlueprintCosmetic, meta=(WorldContext = "WorldContextObject", BlueprintInternalUseOnly="true"))
|
|
|
|
static UAsyncAction_PushContentToLayerForPlayer* PushContentToLayerForPlayer(APlayerController* OwningPlayer, UPARAM(meta = (AllowAbstract=false)) TSoftClassPtr<UCommonActivatableWidget> WidgetClass, UPARAM(meta = (Categories = "UI.Layer")) FGameplayTag LayerName, bool bSuspendInputUntilComplete = true);
|
|
|
|
|
|
|
|
virtual void Activate() override;
|
|
|
|
|
|
|
|
public:
|
|
|
|
|
|
|
|
UPROPERTY(BlueprintAssignable)
|
|
|
|
FPushContentToLayerForPlayerAsyncDelegate BeforePush;
|
|
|
|
|
|
|
|
UPROPERTY(BlueprintAssignable)
|
|
|
|
FPushContentToLayerForPlayerAsyncDelegate AfterPush;
|
|
|
|
|
|
|
|
private:
|
|
|
|
|
|
|
|
FGameplayTag LayerName;
|
|
|
|
bool bSuspendInputUntilComplete = false;
|
|
|
|
TWeakObjectPtr<APlayerController> OwningPlayerPtr;
|
|
|
|
TSoftClassPtr<UCommonActivatableWidget> WidgetClass;
|
|
|
|
|
|
|
|
TSharedPtr<FStreamableHandle> StreamingHandle;
|
|
|
|
};
|