Files
UnrealEngineUWP/Engine/Source/Editor/DetailCustomizations/Private/StringAssetReferenceCustomization.h
Ben Marsh 20bf0eb6a1 Updating copyright notices to 2017 (copying from //Tasks/UE4/Dev-Copyright-2017).
#rb none
#lockdown Nick.Penwarden

[CL 3226823 by Ben Marsh in Main branch]
2016-12-08 08:52:44 -05:00

36 lines
1.3 KiB
C++

// Copyright 1998-2017 Epic Games, Inc. All Rights Reserved.
#pragma once
#include "CoreMinimal.h"
#include "IPropertyTypeCustomization.h"
class IPropertyHandle;
/**
* Customizes a string asset reference to look like a UObject property
*/
class FStringAssetReferenceCustomization : public IPropertyTypeCustomization
{
public:
static TSharedRef<IPropertyTypeCustomization> MakeInstance()
{
return MakeShareable( new FStringAssetReferenceCustomization );
}
/** IPropertyTypeCustomization interface */
virtual void CustomizeHeader( TSharedRef<class IPropertyHandle> InStructPropertyHandle, class FDetailWidgetRow& HeaderRow, IPropertyTypeCustomizationUtils& StructCustomizationUtils ) override;
virtual void CustomizeChildren( TSharedRef<class IPropertyHandle> InStructPropertyHandle, class IDetailChildrenBuilder& StructBuilder, IPropertyTypeCustomizationUtils& StructCustomizationUtils ) override;
private:
bool OnShouldFilterAsset( const class FAssetData& InAssetData ) const;
private:
/** Handle to the struct property being customized */
TSharedPtr<IPropertyHandle> StructPropertyHandle;
/** Classes that can be used with this property */
TArray<UClass*> CustomClassFilters;
/** Whether the classes in the above array must be an exact match, or whether they can also be a derived type; default is false */
bool bExactClass;
};