RealtimeStyleTransferRuntime/Plugins/CommonGame/Source/Public/Messaging/CommonMessagingSubsystem.h

51 lines
1.4 KiB
C
Raw Normal View History

2022-05-23 18:41:30 +00:00
// Copyright Epic Games, Inc. All Rights Reserved.
#pragma once
#include "CoreMinimal.h"
#include "UObject/Interface.h"
#include "Subsystems/LocalPlayerSubsystem.h"
#include "CommonMessagingSubsystem.generated.h"
class UCommonGameDialog;
class UCommonGameDialogDescriptor;
/** Possible results from a dialog */
UENUM(BlueprintType)
enum class ECommonMessagingResult : uint8
{
/** The "yes" button was pressed */
Confirmed,
/** The "no" button was pressed */
Declined,
/** The "ignore/cancel" button was pressed */
Cancelled,
/** The dialog was explicitly killed (no user input) */
Killed,
Unknown UMETA(Hidden)
};
DECLARE_DELEGATE_OneParam(FCommonMessagingResultDelegate, ECommonMessagingResult /* Result */);
/**
*
*/
UCLASS(config = Game)
class COMMONGAME_API UCommonMessagingSubsystem : public ULocalPlayerSubsystem
{
GENERATED_BODY()
public:
UCommonMessagingSubsystem() { }
virtual void Initialize(FSubsystemCollectionBase& Collection) override;
virtual void Deinitialize() override;
virtual bool ShouldCreateSubsystem(UObject* Outer) const override;
virtual void ShowConfirmation(UCommonGameDialogDescriptor* DialogDescriptor, FCommonMessagingResultDelegate ResultCallback = FCommonMessagingResultDelegate());
virtual void ShowError(UCommonGameDialogDescriptor* DialogDescriptor, FCommonMessagingResultDelegate ResultCallback = FCommonMessagingResultDelegate());
private:
};