2014-12-07 19:09:38 -05:00
|
|
|
// Copyright 1998-2015 Epic Games, Inc. All Rights Reserved.
|
2014-03-14 14:13:41 -04:00
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
|
|
|
|
|
|
2014-09-02 15:22:15 -04:00
|
|
|
/**
|
|
|
|
|
* Implements a details view customization for the FFilePath structure.
|
|
|
|
|
*/
|
|
|
|
|
class FFilePathStructCustomization
|
|
|
|
|
: public IPropertyTypeCustomization
|
2014-03-14 14:13:41 -04:00
|
|
|
{
|
|
|
|
|
public:
|
|
|
|
|
|
2014-09-02 15:22:15 -04:00
|
|
|
/**
|
|
|
|
|
* Creates an instance of this class.
|
|
|
|
|
*
|
|
|
|
|
* @return The new instance.
|
|
|
|
|
*/
|
|
|
|
|
static TSharedRef<IPropertyTypeCustomization> MakeInstance( )
|
|
|
|
|
{
|
|
|
|
|
return MakeShareable(new FFilePathStructCustomization());
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public:
|
|
|
|
|
|
|
|
|
|
// IPropertyTypeCustomization interface
|
|
|
|
|
|
|
|
|
|
virtual void CustomizeChildren( TSharedRef<class IPropertyHandle> StructPropertyHandle, class IDetailChildrenBuilder& StructBuilder, IPropertyTypeCustomizationUtils& StructCustomizationUtils ) override;
|
2014-06-13 06:14:46 -04:00
|
|
|
virtual void CustomizeHeader( TSharedRef<class IPropertyHandle> StructPropertyHandle, class FDetailWidgetRow& HeaderRow, IPropertyTypeCustomizationUtils& StructCustomizationUtils ) override;
|
2014-03-14 14:13:41 -04:00
|
|
|
|
|
|
|
|
private:
|
|
|
|
|
|
2014-09-02 15:22:15 -04:00
|
|
|
/** Callback for getting the selected path in the picker widget. */
|
|
|
|
|
FString HandleFilePathPickerFilePath( ) const;
|
2014-03-14 14:13:41 -04:00
|
|
|
|
2014-09-02 15:22:15 -04:00
|
|
|
/** Callback for picking a file in the file path picker. */
|
|
|
|
|
void HandleFilePathPickerPathPicked( const FString& PickedPath );
|
|
|
|
|
|
|
|
|
|
private:
|
2014-09-05 17:49:31 -04:00
|
|
|
/** Pointer to the string that will be seet when changing the path */
|
|
|
|
|
TSharedPtr<IPropertyHandle> PathStringProperty;
|
2014-09-02 15:22:15 -04:00
|
|
|
};
|