2014-03-14 14:13:41 -04:00
|
|
|
// Copyright 1998-2014 Epic Games, Inc. All Rights Reserved.
|
|
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
|
|
|
|
|
/** Delegate fired when a path is picked */
|
|
|
|
|
DECLARE_DELEGATE_RetVal_OneParam(bool, FOnPathPicked, FString& /* InOutPath */);
|
|
|
|
|
|
2014-06-04 10:16:14 -04:00
|
|
|
class FFilePathStructCustomization : public IPropertyTypeCustomization
|
2014-03-14 14:13:41 -04:00
|
|
|
{
|
|
|
|
|
public:
|
2014-06-04 10:16:14 -04:00
|
|
|
static TSharedRef<IPropertyTypeCustomization> MakeInstance();
|
2014-03-14 14:13:41 -04:00
|
|
|
|
2014-06-04 10:16:14 -04:00
|
|
|
/** IPropertyTypeCustomization interface */
|
2014-06-04 11:16:24 -04:00
|
|
|
virtual void CustomizeHeader( TSharedRef<class IPropertyHandle> StructPropertyHandle, class FDetailWidgetRow& HeaderRow, IPropertyTypeCustomizationUtils& StructCustomizationUtils ) OVERRIDE;
|
2014-03-14 14:13:41 -04:00
|
|
|
|
2014-06-04 11:16:24 -04:00
|
|
|
virtual void CustomizeChildren( TSharedRef<class IPropertyHandle> StructPropertyHandle, class IDetailChildrenBuilder& StructBuilder, IPropertyTypeCustomizationUtils& StructCustomizationUtils ) OVERRIDE;
|
2014-03-14 14:13:41 -04:00
|
|
|
|
|
|
|
|
static TSharedPtr<SWidget> CreatePickerWidget(TSharedRef<class IPropertyHandle> StructPropertyHandle, const FString& FileFilterExtension = FString(TEXT("*")), const FOnPathPicked& OnPathPicked = FOnPathPicked());
|
|
|
|
|
|
|
|
|
|
private:
|
|
|
|
|
|
|
|
|
|
/** Delegate for displaying text value of file */
|
|
|
|
|
FText GetDisplayedText(TSharedRef<IPropertyHandle> PropertyHandle) const;
|
|
|
|
|
|
|
|
|
|
/** Delegate used to display a file picker */
|
|
|
|
|
static FReply OnPickFile(TSharedRef<IPropertyHandle> PropertyHandle);
|
|
|
|
|
};
|