RealtimeStyleTransferRuntime/Plugins/GameSettings/Source/Public/Widgets/GameSettingVisualData.h

72 lines
2.0 KiB
C
Raw Normal View History

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 "Containers/Array.h"
#include "Containers/Map.h"
2022-05-23 18:41:30 +00:00
#include "Engine/DataAsset.h"
2022-09-13 07:18:28 +00:00
#include "Templates/SubclassOf.h"
#include "UObject/SoftObjectPtr.h"
#include "UObject/UObjectGlobals.h"
2022-05-23 18:41:30 +00:00
#include "GameSettingVisualData.generated.h"
2022-09-13 07:18:28 +00:00
class FName;
2022-05-23 18:41:30 +00:00
class UGameSetting;
class UGameSettingDetailExtension;
2022-09-13 07:18:28 +00:00
class UGameSettingListEntryBase;
class UObject;
2022-05-23 18:41:30 +00:00
USTRUCT(BlueprintType)
struct FGameSettingClassExtensions
{
GENERATED_BODY()
public:
UPROPERTY(EditAnywhere, Category = Extensions)
TArray<TSoftClassPtr<UGameSettingDetailExtension>> Extensions;
};
USTRUCT(BlueprintType)
struct FGameSettingNameExtensions
{
GENERATED_BODY()
public:
UPROPERTY(EditAnywhere, Category = Extensions)
bool bIncludeClassDefaultExtensions = false;
UPROPERTY(EditAnywhere, Category = Extensions)
TArray<TSoftClassPtr<UGameSettingDetailExtension>> Extensions;
};
/**
*
*/
UCLASS(BlueprintType)
class GAMESETTINGS_API UGameSettingVisualData : public UDataAsset
{
GENERATED_BODY()
public:
TSubclassOf<UGameSettingListEntryBase> GetEntryForSetting(UGameSetting* InSetting);
virtual TArray<TSoftClassPtr<UGameSettingDetailExtension>> GatherDetailExtensions(UGameSetting* InSetting);
protected:
virtual TSubclassOf<UGameSettingListEntryBase> GetCustomEntryForSetting(UGameSetting* InSetting);
protected:
UPROPERTY(EditDefaultsOnly, Category = ListEntries, meta = (AllowAbstract))
TMap<TSubclassOf<UGameSetting>, TSubclassOf<UGameSettingListEntryBase>> EntryWidgetForClass;
UPROPERTY(EditDefaultsOnly, Category = ListEntries, meta = (AllowAbstract))
TMap<FName, TSubclassOf<UGameSettingListEntryBase>> EntryWidgetForName;
UPROPERTY(EditDefaultsOnly, Category = Extensions, meta = (AllowAbstract))
TMap<TSubclassOf<UGameSetting>, FGameSettingClassExtensions> ExtensionsForClasses;
UPROPERTY(EditDefaultsOnly, Category = Extensions)
TMap<FName, FGameSettingNameExtensions> ExtensionsForName;
};