Allow creation of default property value widgets to specify whether or not the default property buttons are displayed.

[CL 2627451 by Matt Kuhlenschmidt in Main branch]
This commit is contained in:
Matt Kuhlenschmidt
2015-07-21 11:00:22 -04:00
committed by matt.kuhlenschmidt@epicgames.com
parent 552026700c
commit ac0982e1d0
3 changed files with 5 additions and 4 deletions

View File

@@ -1550,13 +1550,14 @@ TSharedRef<SWidget> FPropertyHandleBase::CreatePropertyNameWidget( const FText&
return SNullWidget::NullWidget;
}
TSharedRef<SWidget> FPropertyHandleBase::CreatePropertyValueWidget() const
TSharedRef<SWidget> FPropertyHandleBase::CreatePropertyValueWidget( bool bDisplayDefaultPropertyButtons ) const
{
if( Implementation.IsValid() && Implementation->GetPropertyNode().IsValid() )
{
TSharedPtr<FPropertyEditor> PropertyEditor = FPropertyEditor::Create( Implementation->GetPropertyNode().ToSharedRef(), Implementation->GetPropertyUtilities().ToSharedRef() );
return SNew( SPropertyValueWidget, PropertyEditor, Implementation->GetPropertyUtilities() );
return SNew( SPropertyValueWidget, PropertyEditor, Implementation->GetPropertyUtilities() )
.ShowPropertyButtons( bDisplayDefaultPropertyButtons );
}
return SNullWidget::NullWidget;

View File

@@ -369,7 +369,7 @@ public:
virtual bool IsCustomized() const override;
virtual FString GeneratePathToProperty() const override;
virtual TSharedRef<SWidget> CreatePropertyNameWidget( const FText& NameOverride = FText::GetEmpty(), const FText& ToolTipOverride = FText::GetEmpty(), bool bDisplayResetToDefault = false, bool bDisplayText = true, bool bDisplayThumbnail = true ) const override;
virtual TSharedRef<SWidget> CreatePropertyValueWidget() const override;
virtual TSharedRef<SWidget> CreatePropertyValueWidget( bool bDisplayDefaultPropertyButtons = true ) const override;
virtual bool IsEditConst() const override;
virtual void SetOnPropertyValueChanged( const FSimpleDelegate& InOnPropertyValueChanged ) override;
virtual int32 GetIndexInArray() const override;

View File

@@ -372,7 +372,7 @@ public:
* @return the value widget for this property
*/
virtual TSharedRef<SWidget> CreatePropertyValueWidget() const = 0;
virtual TSharedRef<SWidget> CreatePropertyValueWidget( bool bDisplayDefaultPropertyButtons = true ) const = 0;
/**
* Adds a restriction to the possible values for this property.