2019-12-26 15:33:43 -05:00
|
|
|
// Copyright Epic Games, Inc. All Rights Reserved.
|
2019-01-10 17:26:53 -05:00
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
|
|
|
|
|
#include "CoreMinimal.h"
|
|
|
|
|
#include "IPropertyTypeCustomization.h"
|
|
|
|
|
#include "Widgets/Input/NumericTypeInterface.h"
|
|
|
|
|
|
|
|
|
|
class IDetailLayoutBuilder;
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Customize the FTimecode.
|
|
|
|
|
*/
|
|
|
|
|
class FTimecodeDetailsCustomization : public IPropertyTypeCustomization
|
|
|
|
|
{
|
|
|
|
|
public:
|
|
|
|
|
static TSharedRef<IPropertyTypeCustomization> MakeInstance()
|
|
|
|
|
{
|
|
|
|
|
return MakeShared<FTimecodeDetailsCustomization>();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
FTimecodeDetailsCustomization()
|
|
|
|
|
{
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/** IPropertyTypeCustomization interface */
|
|
|
|
|
virtual void CustomizeHeader(TSharedRef<IPropertyHandle> PropertyHandle, FDetailWidgetRow& HeaderRow, IPropertyTypeCustomizationUtils& CustomizationUtils) override {}
|
|
|
|
|
virtual void CustomizeChildren(TSharedRef<IPropertyHandle> PropertyHandle, IDetailChildrenBuilder& ChildBuilder, IPropertyTypeCustomizationUtils& CustomizationUtils) override;
|
|
|
|
|
|
|
|
|
|
private:
|
|
|
|
|
FText OnGetTimecodeText() const;
|
|
|
|
|
void OnTimecodeTextCommitted(const FText& InText, ETextCommit::Type CommitInfo);
|
|
|
|
|
|
|
|
|
|
/** Store the property handle to the Timecode field so we can get/set the value on the object via text box callbacks. */
|
|
|
|
|
TSharedPtr<IPropertyHandle> TimecodeProperty;
|
|
|
|
|
};
|