void UAnimGraphNode_BoneDrivenController::AddRangePropertyRow(const FText& Name, const FText& Tooltip, IDetailCategoryBuilder& Category, TSharedRef<IPropertyHandle> PropertyHandle, const FName MinPropertyName, const FName MaxPropertyName, TAttribute<EVisibility> VisibilityAttribute) { const float MiddlePadding = 4.0f; TSharedPtr<IPropertyHandle> MinProperty = PropertyHandle->GetChildHandle(MinPropertyName); Category.GetParentLayout().HideProperty(MinProperty); TSharedPtr<IPropertyHandle> MaxProperty = PropertyHandle->GetChildHandle(MaxPropertyName); Category.GetParentLayout().HideProperty(MaxProperty); Category.AddCustomRow(Name) .Visibility(VisibilityAttribute) .NameContent() [ SNew(STextBlock) .Text(Name) .ToolTipText(Tooltip) .Font(IDetailLayoutBuilder::GetDetailFont()) ] .ValueContent() .MinDesiredWidth(100.0f * 2.0f) .MaxDesiredWidth(100.0f * 2.0f) [ SNew(SHorizontalBox) +SHorizontalBox::Slot() .FillWidth(1) .Padding(0.0f, 0.0f, MiddlePadding, 0.0f) .VAlign(VAlign_Center) [ MinProperty->CreatePropertyValueWidget() ] +SHorizontalBox::Slot() .AutoWidth() [ SNew(STextBlock) .Text(LOCTEXT("MinMaxSpacer", "..")) .Font(IDetailLayoutBuilder::GetDetailFont()) ] +SHorizontalBox::Slot() .FillWidth(1) .Padding(MiddlePadding, 0.0f, 0.0f, 0.0f) .VAlign(VAlign_Center) [ MaxProperty->CreatePropertyValueWidget() ] ]; }
void FAnimTransitionNodeDetails::CreateTransitionEventPropertyWidgets(IDetailCategoryBuilder& TransitionCategory, FString TransitionName) { TSharedPtr<IPropertyHandle> NameProperty = TransitionCategory.GetParentLayout().GetProperty(*(TransitionName + TEXT(".NotifyName"))); TransitionCategory.AddProperty( NameProperty ) .DisplayName( LOCTEXT("CreateTransition_CustomBlueprintEvent", "Custom Blueprint Event") ); }
void UAnimGraphNode_BoneDrivenController::AddTripletPropertyRow(const FText& Name, const FText& Tooltip, IDetailCategoryBuilder& Category, TSharedRef<IPropertyHandle> PropertyHandle, const FName XPropertyName, const FName YPropertyName, const FName ZPropertyName) { const float XYZPadding = 5.0f; TSharedPtr<IPropertyHandle> XProperty = PropertyHandle->GetChildHandle(XPropertyName); Category.GetParentLayout().HideProperty(XProperty); TSharedPtr<IPropertyHandle> YProperty = PropertyHandle->GetChildHandle(YPropertyName); Category.GetParentLayout().HideProperty(YProperty); TSharedPtr<IPropertyHandle> ZProperty = PropertyHandle->GetChildHandle(ZPropertyName); Category.GetParentLayout().HideProperty(ZProperty); Category.AddCustomRow(Name) .NameContent() [ SNew(STextBlock) .Text(Name) .ToolTipText(Tooltip) .Font(IDetailLayoutBuilder::GetDetailFont()) ] .ValueContent() [ SNew(SHorizontalBox) + SHorizontalBox::Slot() .Padding(0.f, 0.f, XYZPadding, 0.f) .AutoWidth() [ SNew(SHorizontalBox) + SHorizontalBox::Slot() .AutoWidth() [ XProperty->CreatePropertyNameWidget() ] + SHorizontalBox::Slot() .AutoWidth() [ XProperty->CreatePropertyValueWidget() ] ] + SHorizontalBox::Slot() .Padding(0.f, 0.f, XYZPadding, 0.f) .AutoWidth() [ SNew(SHorizontalBox) + SHorizontalBox::Slot() .AutoWidth() [ YProperty->CreatePropertyNameWidget() ] + SHorizontalBox::Slot() .AutoWidth() [ YProperty->CreatePropertyValueWidget() ] ] + SHorizontalBox::Slot() .Padding(0.f, 0.f, XYZPadding, 0.f) .AutoWidth() [ SNew(SHorizontalBox) + SHorizontalBox::Slot() .AutoWidth() [ ZProperty->CreatePropertyNameWidget() ] + SHorizontalBox::Slot() .AutoWidth() [ ZProperty->CreatePropertyValueWidget() ] ] ]; }