File size: 1,509 Bytes
4331f83 | 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 49 50 51 52 53 54 55 | // Copyright Epic Games, Inc. All Rights Reserved.
#pragma once
#include "Subsystems/LocalPlayerSubsystem.h"
#include "CommonMessagingSubsystem.generated.h"
#define UE_API COMMONGAME_API
class FSubsystemCollectionBase;
class UCommonGameDialogDescriptor;
class UObject;
/** 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(MinimalAPI, config = Game)
class UCommonMessagingSubsystem : public ULocalPlayerSubsystem
{
GENERATED_BODY()
public:
UCommonMessagingSubsystem() { }
UE_API virtual void Initialize(FSubsystemCollectionBase& Collection) override;
UE_API virtual void Deinitialize() override;
UE_API virtual bool ShouldCreateSubsystem(UObject* Outer) const override;
UE_API virtual void ShowConfirmation(UCommonGameDialogDescriptor* DialogDescriptor, FCommonMessagingResultDelegate ResultCallback = FCommonMessagingResultDelegate());
UE_API virtual void ShowError(UCommonGameDialogDescriptor* DialogDescriptor, FCommonMessagingResultDelegate ResultCallback = FCommonMessagingResultDelegate());
private:
};
#undef UE_API
|