本文整理汇总了C++中IDetailLayoutBuilder类的典型用法代码示例。如果您正苦于以下问题:C++ IDetailLayoutBuilder类的具体用法?C++ IDetailLayoutBuilder怎么用?C++ IDetailLayoutBuilder使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了IDetailLayoutBuilder类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: Create
void FComponentMaterialCategory::Create( IDetailLayoutBuilder& DetailBuilder )
{
NotifyHook = DetailBuilder.GetPropertyUtilities()->GetNotifyHook();
FMaterialListDelegates MaterialListDelegates;
MaterialListDelegates.OnGetMaterials.BindSP( this, &FComponentMaterialCategory::OnGetMaterialsForView );
MaterialListDelegates.OnMaterialChanged.BindSP( this, &FComponentMaterialCategory::OnMaterialChanged );
TSharedRef<FMaterialList> MaterialList = MakeShareable( new FMaterialList( DetailBuilder, MaterialListDelegates ) );
bool bAnyMaterialsToDisplay = false;
for( FMaterialIterator It( SelectedComponents ); It; ++It )
{
UActorComponent* CurrentComponent = It.GetComponent();
if( !bAnyMaterialsToDisplay )
{
bAnyMaterialsToDisplay = true;
break;
}
}
// only show the category if there are materials to display
if( bAnyMaterialsToDisplay )
{
// Make a category for the materials.
IDetailCategoryBuilder& MaterialCategory = DetailBuilder.EditCategory("Materials", FText::GetEmpty(), ECategoryPriority::TypeSpecific );
MaterialCategory.AddCustomBuilder( MaterialList );
}
}
示例2: CustomizeDetails
void FSpriteComponentDetailsCustomization::CustomizeDetails(IDetailLayoutBuilder& DetailBuilder)
{
// Create a category so this is displayed early in the properties
IDetailCategoryBuilder& SpriteCategory = DetailBuilder.EditCategory("Sprite", FText::GetEmpty(), ECategoryPriority::Important);
ObjectsBeingCustomized.Empty();
DetailBuilder.GetObjectsBeingCustomized(/*out*/ ObjectsBeingCustomized);
if (ObjectsBeingCustomized.Num() > 1)
{
// Expose merge buttons
FDetailWidgetRow& MergeRow = SpriteCategory.AddCustomRow(LOCTEXT("MergeSearchText", "Merge"))
.WholeRowContent()
[
SNew(SHorizontalBox)
+SHorizontalBox::Slot()
.AutoWidth()
.Padding(2.0f, 0.0f)
.VAlign(VAlign_Center)
.HAlign(HAlign_Left)
[
SNew(SButton)
.Text(LOCTEXT("MergeSprites", "Merge Sprites"))
.ToolTipText(LOCTEXT("MergeSprites_Tooltip", "Merges all selected sprite components into entries on a single grouped sprite component"))
.OnClicked(this, &FSpriteComponentDetailsCustomization::MergeSprites)
]
];
}
}
示例3: CustomizeDetails
void FRuntimeMeshComponentDetails::CustomizeDetails( IDetailLayoutBuilder& DetailBuilder )
{
IDetailCategoryBuilder& RuntimeMeshCategory = DetailBuilder.EditCategory("RuntimeMesh");
const FText ConvertToStaticMeshText = LOCTEXT("ConvertToStaticMesh", "Create StaticMesh");
// Cache set of selected things
SelectedObjectsList = DetailBuilder.GetDetailsView().GetSelectedObjects();
RuntimeMeshCategory.AddCustomRow(ConvertToStaticMeshText, false)
.NameContent()
[
SNullWidget::NullWidget
]
.ValueContent()
.VAlign(VAlign_Center)
.MaxDesiredWidth(250)
[
SNew(SButton)
.VAlign(VAlign_Center)
.ToolTipText(LOCTEXT("ConvertToStaticMeshTooltip", "Create a new StaticMesh asset using current geometry from this RuntimeMeshComponent. Does not modify instance."))
.OnClicked(this, &FRuntimeMeshComponentDetails::ClickedOnConvertToStaticMesh)
.IsEnabled(this, &FRuntimeMeshComponentDetails::ConvertToStaticMeshEnabled)
.Content()
[
SNew(STextBlock)
.Text(ConvertToStaticMeshText)
]
];
}
示例4: CustomizeDetails
void FEditorTutorialDetailsCustomization::CustomizeDetails( IDetailLayoutBuilder& DetailLayout )
{
struct Local
{
static FReply OnLaunchClicked(UEditorTutorial* Tutorial)
{
FLevelEditorModule& LevelEditorModule = FModuleManager::Get().GetModuleChecked<FLevelEditorModule>("LevelEditor");
IIntroTutorials& IntroTutorials = FModuleManager::Get().GetModuleChecked<IIntroTutorials>("IntroTutorials");
IntroTutorials.LaunchTutorial(Tutorial, true, LevelEditorModule.GetLevelEditorTab()->GetParentWindow());
return FReply::Handled();
}
};
TArray<TWeakObjectPtr<UObject>> Objects;
DetailLayout.GetObjectsBeingCustomized(Objects);
check(Objects.Num() > 0);
UEditorTutorial* Tutorial = CastChecked<UEditorTutorial>(Objects[0].Get());
IDetailCategoryBuilder& CategoryBuilder = DetailLayout.EditCategory(TEXT("Testing"), LOCTEXT("TestingSection", "Testing"), ECategoryPriority::Important);
CategoryBuilder.AddCustomRow(LOCTEXT("LaunchButtonLabel", "Launch"))
.WholeRowContent()
.VAlign(VAlign_Center)
.HAlign(HAlign_Left)
[
SNew(SButton)
.OnClicked(FOnClicked::CreateStatic(&Local::OnLaunchClicked, Tutorial))
.Text(LOCTEXT("LaunchButtonLabel", "Launch"))
.ToolTipText(LOCTEXT("LaunchButtonTooltip", "Test this tutorial."))
];
}
示例5: CustomizeDetails
void FDestructibleMeshDetails::CustomizeDetails(IDetailLayoutBuilder& DetailBuilder)
{
//we always hide bodysetup as it's not useful in this editor
TSharedPtr<IPropertyHandle> BodySetupHandler = DetailBuilder.GetProperty("BodySetup");
if (BodySetupHandler.IsValid())
{
DetailBuilder.HideProperty(BodySetupHandler);
}
//rest of customization is just moving stuff out of DefaultDestructibleParameters so it's nicer to view
TSharedPtr<IPropertyHandle> DefaultParams = DetailBuilder.GetProperty("DefaultDestructibleParameters");
if (DefaultParams.IsValid() == false)
{
return;
}
AddStructToDetails("Damage", "DefaultDestructibleParameters.DamageParameters", DetailBuilder);
AddStructToDetails("Damage", "DefaultDestructibleParameters.AdvancedParameters", DetailBuilder, true, true);
AddStructToDetails("Debris", "DefaultDestructibleParameters.DebrisParameters", DetailBuilder);
AddStructToDetails("Flags", "DefaultDestructibleParameters.Flags", DetailBuilder);
AddStructToDetails("HierarchyDepth", "DefaultDestructibleParameters.SpecialHierarchyDepths", DetailBuilder);
AddStructToDetails("HierarchyDepth", "DefaultDestructibleParameters.DepthParameters", DetailBuilder, false, true);
//hide the default params as we've taken everything out of it
DetailBuilder.HideProperty(DefaultParams);
}
示例6: AddAdvancedSubCategory
void FPrimitiveComponentDetails::AddAdvancedSubCategory( IDetailLayoutBuilder& DetailBuilder, FName MainCategoryName, FName SubCategoryName)
{
TArray<TSharedRef<IPropertyHandle> > SubCategoryProperties;
IDetailCategoryBuilder& SubCategory = DetailBuilder.EditCategory(SubCategoryName);
const bool bSimpleProperties = false;
const bool bAdvancedProperties = true;
SubCategory.GetDefaultProperties( SubCategoryProperties, bSimpleProperties, bAdvancedProperties );
if( SubCategoryProperties.Num() > 0 )
{
IDetailCategoryBuilder& MainCategory = DetailBuilder.EditCategory(MainCategoryName);
const bool bForAdvanced = true;
IDetailGroup& Group = MainCategory.AddGroup( SubCategoryName, FText::FromName(SubCategoryName), bForAdvanced );
for( int32 PropertyIndex = 0; PropertyIndex < SubCategoryProperties.Num(); ++PropertyIndex )
{
TSharedRef<IPropertyHandle>& PropertyHandle = SubCategoryProperties[PropertyIndex];
// Ignore customized properties
if( !PropertyHandle->IsCustomized() )
{
Group.AddPropertyRow( SubCategoryProperties[PropertyIndex] );
}
}
}
}
示例7: CustomizeDetails
void FAnimMontageSegmentDetails::CustomizeDetails( IDetailLayoutBuilder& DetailBuilder )
{
IDetailCategoryBuilder& SegmentCategory = DetailBuilder.EditCategory("Animation Segment", LOCTEXT("AnimationSegmentCategoryTitle", "Animation Segment") );
SegmentCategory.AddProperty("AnimSegment.AnimReference").DisplayName( LOCTEXT("AnimationReferenceLabel", "Animation Reference") );
SegmentCategory.AddProperty("AnimSegment.AnimStartTime").DisplayName( LOCTEXT("StartTimeLabel", "Start Time") );
SegmentCategory.AddProperty("AnimSegment.AnimEndTime").DisplayName( LOCTEXT("EndTimeLabel", "End Time") );
SegmentCategory.AddProperty("AnimSegment.AnimPlayRate").DisplayName( LOCTEXT("PlayRateLabel", "Play Rate") );
SegmentCategory.AddProperty("AnimSegment.LoopingCount").DisplayName( LOCTEXT("LoopCountLabel", "Loop Count") );
TSharedPtr<IPropertyHandle> InPropertyHandle = DetailBuilder.GetProperty("AnimSegment.AnimReference");
UObject *Object = NULL;
InPropertyHandle->GetValue(Object);
UAnimSequenceBase *AnimRef = Cast<UAnimSequenceBase>(Object);
USkeleton *Skeleton = NULL;
if(AnimRef != NULL)
{
Skeleton = AnimRef->GetSkeleton();
}
SegmentCategory.AddCustomRow(FText::GetEmpty(), false)
[
SNew(SAnimationSegmentViewport)
.Skeleton(Skeleton)
.AnimRef(AnimRef)
.AnimRefPropertyHandle(DetailBuilder.GetProperty("AnimSegment.AnimReference"))
.StartTimePropertyHandle(DetailBuilder.GetProperty("AnimSegment.AnimStartTime"))
.EndTimePropertyHandle(DetailBuilder.GetProperty("AnimSegment.AnimEndTime"))
];
}
示例8: AddStructToDetails
void AddStructToDetails(FName CategoryName, FName PropertyName, IDetailLayoutBuilder& DetailBuilder, bool bInline = true, bool bAdvanced = false)
{
IDetailCategoryBuilder& Category = DetailBuilder.EditCategory(CategoryName, TEXT(""), ECategoryPriority::Important);
TSharedPtr<IPropertyHandle> Params = DetailBuilder.GetProperty(PropertyName);
if (Params.IsValid())
{
EPropertyLocation::Type PropertyLocation = bAdvanced ? EPropertyLocation::Advanced : EPropertyLocation::Default;
if (bInline)
{
uint32 NumChildren = 0;
Params->GetNumChildren(NumChildren);
// add all collision properties
for (uint32 ChildIndex = 0; ChildIndex < NumChildren; ++ChildIndex)
{
TSharedPtr<IPropertyHandle> ChildProperty = Params->GetChildHandle(ChildIndex);
Category.AddProperty(ChildProperty, PropertyLocation);
}
}
else
{
Category.AddProperty(Params, PropertyLocation);
}
}
}
示例9: CustomizeDetails
void FDerivedCustomization::CustomizeDetails(IDetailLayoutBuilder& DetailLayout)
{
// So now we're customizing UDerivedClass object
// First, try to hide an inherited property
{
// 'HideMe' property is defined in UBaseClass
TSharedPtr<IPropertyHandle> PropertyToHide = DetailLayout.GetProperty(GET_MEMBER_NAME_CHECKED(UDerivedClass, HideMe));
PropertyToHide->MarkHiddenByCustomization();
}
{
// Now grab any struct property (or property that has customized property value widget)
// Note that this is property defined in UDerivedClass!
TSharedPtr<IPropertyHandle> TestProperty = DetailLayout.GetProperty(GET_MEMBER_NAME_CHECKED(UDerivedClass, Vector2dProperty));
// Hide this property
TestProperty->MarkHiddenByCustomization();
// Get a category so we can add a TestProperty back to the panel
IDetailCategoryBuilder& DerivedCategory = DetailLayout.EditCategory("Derived");
DerivedCategory.AddCustomRow(LOCTEXT("DerivedObjectLabel", "Derived"))
.NameContent()
[
TestProperty->CreatePropertyNameWidget()
]
.ValueContent()
[
// This will return NullWidget - thats the problem
TestProperty->CreatePropertyValueWidget()
];
}
}
示例10: CustomizeDetails
void FFormatTextDetails::CustomizeDetails( IDetailLayoutBuilder& DetailLayout )
{
const TArray<TWeakObjectPtr<UObject>> Objects = DetailLayout.GetDetailsView().GetSelectedObjects();
check(Objects.Num() > 0);
if (Objects.Num() == 1)
{
TargetNode = CastChecked<UK2Node_FormatText>(Objects[0].Get());
TSharedRef<IPropertyHandle> PropertyHandle = DetailLayout.GetProperty(FName("PinNames"), UK2Node_FormatText::StaticClass());
IDetailCategoryBuilder& InputsCategory = DetailLayout.EditCategory("Arguments", LOCTEXT("FormatTextDetailsArguments", "Arguments"));
InputsCategory.AddCustomRow( LOCTEXT("FunctionNewInputArg", "New") )
[
SNew(SBox)
.HAlign(HAlign_Right)
[
SNew(SButton)
.Text(LOCTEXT("FunctionNewInputArg", "New"))
.OnClicked(this, &FFormatTextDetails::OnAddNewArgument)
.IsEnabled(this, &FFormatTextDetails::CanEditArguments)
]
];
Layout = MakeShareable( new FFormatTextLayout(TargetNode) );
InputsCategory.AddCustomBuilder( Layout.ToSharedRef() );
}
UPackage::PackageDirtyStateChangedEvent.AddSP(this, &FFormatTextDetails::OnEditorPackageModified);
}
示例11: CustomizeDetails
void FFMODAmbientSoundDetails::CustomizeDetails( IDetailLayoutBuilder& DetailBuilder )
{
const TArray< TWeakObjectPtr<UObject> >& SelectedObjects = DetailBuilder.GetDetailsView().GetSelectedObjects();
for( int32 ObjectIndex = 0; !AmbientSound.IsValid() && ObjectIndex < SelectedObjects.Num(); ++ObjectIndex )
{
const TWeakObjectPtr<UObject>& CurrentObject = SelectedObjects[ObjectIndex];
if ( CurrentObject.IsValid() )
{
AmbientSound = Cast<AFMODAmbientSound>(CurrentObject.Get());
}
}
DetailBuilder.EditCategory(TEXT("Sound"))
.AddCustomRow(FText::GetEmpty())
[
SNew(SVerticalBox)
+ SVerticalBox::Slot()
.Padding( 0, 2.0f, 0, 0 )
.FillHeight(1.0f)
.VAlign( VAlign_Center )
[
SNew(SHorizontalBox)
+SHorizontalBox::Slot()
.AutoWidth()
.Padding( 2.0f, 0.0f )
.VAlign(VAlign_Center)
.HAlign(HAlign_Left)
[
SNew(SButton)
.VAlign(VAlign_Center)
.OnClicked( this, &FFMODAmbientSoundDetails::OnEditSoundClicked )
.Text( LOCTEXT("EditAsset", "Edit") )
.ToolTipText( LOCTEXT("EditAssetToolTip", "Edit this sound cue") )
]
+SHorizontalBox::Slot()
.AutoWidth()
.Padding( 2.0f, 0.0f )
.VAlign(VAlign_Center)
.HAlign(HAlign_Left)
[
SNew(SButton)
.VAlign(VAlign_Center)
.OnClicked( this, &FFMODAmbientSoundDetails::OnPlaySoundClicked )
.Text( LOCTEXT("PlaySoundCue", "Play") )
]
+SHorizontalBox::Slot()
.AutoWidth()
.Padding( 2.0f, 0.0f )
.VAlign(VAlign_Center)
.HAlign(HAlign_Left)
[
SNew(SButton)
.VAlign(VAlign_Center)
.OnClicked( this, &FFMODAmbientSoundDetails::OnStopSoundClicked )
.Text( LOCTEXT("StopSoundCue", "Stop") )
]
]
];
}
示例12: CustomizeDetails
void FAbcImportSettingsCustomization::CustomizeDetails(IDetailLayoutBuilder& LayoutBuilder)
{
TSharedRef<IPropertyHandle> ImportType = LayoutBuilder.GetProperty(GET_MEMBER_NAME_CHECKED(UAbcImportSettings, ImportType));
uint8 EnumValue;
ImportType->GetValue(EnumValue);
IDetailCategoryBuilder& CompressionBuilder = LayoutBuilder.EditCategory("Compression");
CompressionBuilder.SetCategoryVisibility(EnumValue == (uint8)EAlembicImportType::Skeletal);
IDetailCategoryBuilder& StaticMeshBuilder = LayoutBuilder.EditCategory("StaticMesh");
StaticMeshBuilder.SetCategoryVisibility(EnumValue == (uint8)EAlembicImportType::StaticMesh);
FSimpleDelegate OnImportTypeChangedDelegate = FSimpleDelegate::CreateSP(this, &FAbcImportSettingsCustomization::OnImportTypeChanged, &LayoutBuilder);
ImportType->SetOnPropertyValueChanged(OnImportTypeChangedDelegate);
if (UAbcImportSettings::Get()->bReimport)
{
UEnum* ImportTypeEnum = FindObject<UEnum>(ANY_PACKAGE, TEXT("EAlembicImportType"));
static FText RestrictReason = FText::FromString("Unable to change type while reimporting");
TSharedPtr<FPropertyRestriction> EnumRestriction = MakeShareable(new FPropertyRestriction(RestrictReason));
for (uint8 EnumIndex = 0; EnumIndex < (ImportTypeEnum->GetMaxEnumValue() + 1); ++EnumIndex)
{
if (EnumValue != EnumIndex)
{
const FString RestrictValue = ImportTypeEnum->GetDisplayNameTextByValue(EnumIndex).ToString();
EnumRestriction->AddValue(RestrictValue);
}
}
ImportType->AddRestriction(EnumRestriction.ToSharedRef());
}
}
示例13: CustomizeDetails
void FFoliageTypePaintingCustomization::CustomizeDetails(IDetailLayoutBuilder& DetailLayoutBuilder)
{
// Hide categories we are not going to customize
FFoliageTypeCustomizationHelpers::HideFoliageCategory(DetailLayoutBuilder, "Procedural");
FFoliageTypeCustomizationHelpers::HideFoliageCategory(DetailLayoutBuilder, "Reapply");
// Show all the properties with a reapply condition or that depend on another variable to be relevant
TMap<const FName, IDetailPropertyRow*> PropertyRowsByName;
ShowFoliagePropertiesForCategory(DetailLayoutBuilder, "Painting", PropertyRowsByName);
ShowFoliagePropertiesForCategory(DetailLayoutBuilder, "Placement", PropertyRowsByName);
ShowFoliagePropertiesForCategory(DetailLayoutBuilder, "InstanceSettings", PropertyRowsByName);
// Density adjustment factor should only be visible when reapplying
FFoliageTypeCustomizationHelpers::ModifyFoliagePropertyRow(*PropertyRowsByName.Find(GET_MEMBER_NAME_CHECKED(UFoliageType, DensityAdjustmentFactor)),
TAttribute<EVisibility>::Create(TAttribute<EVisibility>::FGetter::CreateSP(this, &FFoliageTypePaintingCustomization::GetReapplyModeVisibility)),
TAttribute<bool>());
// Set the scale visibility attribute for each axis
Scaling = DetailLayoutBuilder.GetProperty(GET_MEMBER_NAME_CHECKED(UFoliageType, Scaling));
ReapplyScaling = DetailLayoutBuilder.GetProperty(GET_MEMBER_NAME_CHECKED(UFoliageType, ReapplyScaling));
FFoliageTypeCustomizationHelpers::ModifyFoliagePropertyRow(*PropertyRowsByName.Find(GET_MEMBER_NAME_CHECKED(UFoliageType, ScaleX)),
TAttribute<EVisibility>::Create(TAttribute<EVisibility>::FGetter::CreateSP(this, &FFoliageTypePaintingCustomization::GetScaleVisibility, EAxis::X)),
TAttribute<bool>());
FFoliageTypeCustomizationHelpers::ModifyFoliagePropertyRow(*PropertyRowsByName.Find(GET_MEMBER_NAME_CHECKED(UFoliageType, ScaleY)),
TAttribute<EVisibility>::Create(TAttribute<EVisibility>::FGetter::CreateSP(this, &FFoliageTypePaintingCustomization::GetScaleVisibility, EAxis::Y)),
TAttribute<bool>());
FFoliageTypeCustomizationHelpers::ModifyFoliagePropertyRow(*PropertyRowsByName.Find(GET_MEMBER_NAME_CHECKED(UFoliageType, ScaleZ)),
TAttribute<EVisibility>::Create(TAttribute<EVisibility>::FGetter::CreateSP(this, &FFoliageTypePaintingCustomization::GetScaleVisibility, EAxis::Z)),
TAttribute<bool>());
}
示例14: CustomizeDetails
void FMatineeActorDetails::CustomizeDetails( IDetailLayoutBuilder& DetailLayout )
{
const TArray< TWeakObjectPtr<UObject> >& SelectedObjects = DetailLayout.GetDetailsView().GetSelectedObjects();
for( int32 ObjectIndex = 0; ObjectIndex < SelectedObjects.Num(); ++ObjectIndex )
{
const TWeakObjectPtr<UObject>& CurrentObject = SelectedObjects[ObjectIndex];
if ( CurrentObject.IsValid() )
{
AMatineeActor* CurrentMatineeActor = Cast<AMatineeActor>(CurrentObject.Get());
if (CurrentMatineeActor != NULL)
{
MatineeActor = CurrentMatineeActor;
break;
}
}
}
DetailLayout.EditCategory( "MatineeActor", NSLOCTEXT("MatineeActorDetails", "MatineeActor", "Matinee Actor"), ECategoryPriority::Important )
.AddCustomRow( NSLOCTEXT("MatineeActorDetails", "OpenMatinee", "Open Matinee") )
[
SNew(SHorizontalBox)
+SHorizontalBox::Slot()
.FillWidth(1.f)
.Padding(0, 5, 10, 5)
[
SNew(SButton)
.ContentPadding(3)
.VAlign(VAlign_Center)
.HAlign(HAlign_Center)
.OnClicked( this, &FMatineeActorDetails::OnOpenMatineeForActor )
.Text( NSLOCTEXT("MatineeActorDetails", "OpenMatinee", "Open Matinee") )
]
];
}
示例15: BuildTextureSection
void FSpriteDetailsCustomization::BuildTextureSection(IDetailCategoryBuilder& SpriteCategory, IDetailLayoutBuilder& DetailLayout)
{
// Grab information about the material
TSharedPtr<IPropertyHandle> DefaultMaterialProperty = DetailLayout.GetProperty(GET_MEMBER_NAME_CHECKED(UPaperSprite, DefaultMaterial));
FText SourceTextureOverrideLabel;
if (DefaultMaterialProperty.IsValid())
{
UObject* DefaultMaterialAsObject;
if (DefaultMaterialProperty->GetValue(/*out*/ DefaultMaterialAsObject) == FPropertyAccess::Success)
{
if (UMaterialInterface* DefaultMaterialInterface = Cast<UMaterialInterface>(DefaultMaterialAsObject))
{
if (UMaterial* DefaultMaterial = DefaultMaterialInterface->GetMaterial())
{
// Get a list of sprite samplers
TArray<const UMaterialExpressionSpriteTextureSampler*> SpriteSamplerExpressions;
DefaultMaterial->GetAllExpressionsOfType(/*inout*/ SpriteSamplerExpressions);
// Turn that into a set of labels
for (const UMaterialExpressionSpriteTextureSampler* Sampler : SpriteSamplerExpressions)
{
if (!Sampler->SlotDisplayName.IsEmpty())
{
if (Sampler->bSampleAdditionalTextures)
{
AdditionalTextureLabels.FindOrAdd(Sampler->AdditionalSlotIndex) = Sampler->SlotDisplayName;
}
else
{
SourceTextureOverrideLabel = Sampler->SlotDisplayName;
}
}
}
}
}
}
}
// Create the base texture widget
TSharedPtr<IPropertyHandle> SourceTextureProperty = DetailLayout.GetProperty(GET_MEMBER_NAME_CHECKED(UPaperSprite, SourceTexture));
DetailLayout.HideProperty(SourceTextureProperty);
SpriteCategory.AddCustomRow(SourceTextureProperty->GetPropertyDisplayName())
.NameContent()
[
CreateTextureNameWidget(SourceTextureProperty, SourceTextureOverrideLabel)
]
.ValueContent()
.MaxDesiredWidth(TOptional<float>())
[
SourceTextureProperty->CreatePropertyValueWidget()
];
// Create the additional textures widget
TSharedPtr<IPropertyHandle> AdditionalSourceTexturesProperty = DetailLayout.GetProperty(GET_MEMBER_NAME_CHECKED(UPaperSprite, AdditionalSourceTextures));
TSharedRef<FDetailArrayBuilder> AdditionalSourceTexturesBuilder = MakeShareable(new FDetailArrayBuilder(AdditionalSourceTexturesProperty.ToSharedRef()));
AdditionalSourceTexturesBuilder->OnGenerateArrayElementWidget(FOnGenerateArrayElementWidget::CreateSP(this, &FSpriteDetailsCustomization::GenerateAdditionalTextureWidget));
SpriteCategory.AddCustomBuilder(AdditionalSourceTexturesBuilder);
}