本文整理汇总了C++中IDetailChildrenBuilder::AddChildGroup方法的典型用法代码示例。如果您正苦于以下问题:C++ IDetailChildrenBuilder::AddChildGroup方法的具体用法?C++ IDetailChildrenBuilder::AddChildGroup怎么用?C++ IDetailChildrenBuilder::AddChildGroup使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类IDetailChildrenBuilder
的用法示例。
在下文中一共展示了IDetailChildrenBuilder::AddChildGroup方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: GenerateChildContent
void FActionMappingsNodeBuilder::GenerateChildContent( IDetailChildrenBuilder& ChildrenBuilder )
{
RebuildGroupedMappings();
for (int32 Index = 0; Index < GroupedMappings.Num(); ++Index)
{
FMappingSet& MappingSet = GroupedMappings[Index];
FString GroupNameString(TEXT("ActionMappings."));
MappingSet.SharedName.AppendString(GroupNameString);
FName GroupName(*GroupNameString);
IDetailGroup& ActionMappingGroup = ChildrenBuilder.AddChildGroup(GroupName, FText::FromName(MappingSet.SharedName));
MappingSet.DetailGroup = &ActionMappingGroup;
TSharedRef<SWidget> AddButton = PropertyCustomizationHelpers::MakeAddButton(FSimpleDelegate::CreateSP(this, &FActionMappingsNodeBuilder::AddActionMappingToGroupButton_OnClick, MappingSet),
LOCTEXT("AddActionMappingToGroupToolTip", "Adds Action Mapping to Group"));
TSharedRef<SWidget> RemoveButton = PropertyCustomizationHelpers::MakeDeleteButton(FSimpleDelegate::CreateSP(this, &FActionMappingsNodeBuilder::RemoveActionMappingGroupButton_OnClick, MappingSet),
LOCTEXT("RemoveActionMappingGroupToolTip", "Removes Action Mapping Group"));
ActionMappingGroup.HeaderRow()
[
SNew( SHorizontalBox )
+ SHorizontalBox::Slot()
.AutoWidth()
[
SNew(SBox)
.WidthOverride( InputConstants::TextBoxWidth )
[
SNew(SEditableTextBox)
.Padding(2.0f)
.Text(FText::FromName(MappingSet.SharedName))
.OnTextCommitted(FOnTextCommitted::CreateSP(this, &FActionMappingsNodeBuilder::OnActionMappingNameCommitted, MappingSet))
.Font(IDetailLayoutBuilder::GetDetailFont())
]
]
+SHorizontalBox::Slot()
.Padding(InputConstants::PropertyPadding)
.HAlign(HAlign_Center)
.VAlign(VAlign_Center)
.AutoWidth()
[
AddButton
]
+SHorizontalBox::Slot()
.Padding(InputConstants::PropertyPadding)
.HAlign(HAlign_Center)
.VAlign(VAlign_Center)
.AutoWidth()
[
RemoveButton
]
];
for (int32 MappingIndex = 0; MappingIndex < MappingSet.Mappings.Num(); ++MappingIndex)
{
ActionMappingGroup.AddPropertyRow(MappingSet.Mappings[MappingIndex]).ShowPropertyButtons(false);
}
}
}
示例2: OnGenerateEventReceiverEntry
void FNiagaraEmitterPropertiesDetails::OnGenerateEventReceiverEntry(TSharedRef<IPropertyHandle> ElementProperty, int32 ElementIndex, IDetailChildrenBuilder& ChildrenBuilder)
{
TSharedPtr<IPropertyHandle> NameProperty = ElementProperty->GetChildHandle(GET_MEMBER_NAME_CHECKED(FNiagaraEventReceiverProperties, Name));
FName DisplayName;
NameProperty->GetValue(DisplayName);
// ChildrenBuilder.AddChildProperty(ElementProperty).DisplayName(FText::FromName(DisplayName));
IDetailGroup& Group = ChildrenBuilder.AddChildGroup(DisplayName, FText::FromName(DisplayName));
uint32 NumChildren = 0;
if (ElementProperty->GetNumChildren(NumChildren) == FPropertyAccess::Success)
{
for (uint32 i = 0; i < NumChildren; ++i)
{
TSharedPtr<IPropertyHandle> Child = ElementProperty->GetChildHandle(i);
//Dont add the ID. We just grab it's name for the name region of this property.
if (Child.IsValid() && Child->GetProperty()->GetName() != GET_MEMBER_NAME_CHECKED(FNiagaraEventReceiverProperties, Name).ToString())
{
TSharedPtr<SWidget> NameWidget;
TSharedPtr<SWidget> ValueWidget;
FDetailWidgetRow DefaultDetailRow;
IDetailPropertyRow& Row = Group.AddPropertyRow(Child.ToSharedRef());
Row.GetDefaultWidgets(NameWidget, ValueWidget, DefaultDetailRow);
Row.CustomWidget(true)
.NameContent()
[
NameWidget.ToSharedRef()
]
.ValueContent()
[
ValueWidget.ToSharedRef()
];
}
}
}
}
开发者ID:JustDo1989,项目名称:UnrealEngine4.11-HairWorks,代码行数:37,代码来源:NiagaraEmitterPropertiesDetailsCustomization.cpp
示例3: OnGenerateEventGeneratorEntry
void FNiagaraEmitterPropertiesDetails::OnGenerateEventGeneratorEntry(TSharedRef<IPropertyHandle> ElementProperty, int32 ElementIndex, IDetailChildrenBuilder& ChildrenBuilder)
{
TSharedPtr<IPropertyHandle> IDProperty = ElementProperty->GetChildHandle(GET_MEMBER_NAME_CHECKED(FNiagaraEventGeneratorProperties, ID));
TSharedPtr<IPropertyHandle> NameProperty = IDProperty->GetChildHandle(GET_MEMBER_NAME_CHECKED(FNiagaraDataSetID, Name));
FName DisplayName;
NameProperty->GetValue(DisplayName);
//IDetailPropertyRow& Row = ChildrenBuilder.AddChildProperty(ElementProperty).DisplayName(FText::FromName(DisplayName));
IDetailGroup& GenGroup = ChildrenBuilder.AddChildGroup(DisplayName, FText::FromName(DisplayName));
uint32 NumChildren = 0;
if (ElementProperty->GetNumChildren(NumChildren) == FPropertyAccess::Success)
{
for (uint32 i = 0; i < NumChildren; ++i)
{
TSharedPtr<IPropertyHandle> Child = ElementProperty->GetChildHandle(i);
//Dont add the ID. We just grab it's name for the name region of this property.
if (Child.IsValid() && Child->GetProperty()->GetName() != GET_MEMBER_NAME_CHECKED(FNiagaraEventGeneratorProperties, ID).ToString())
{
GenGroup.AddPropertyRow(Child.ToSharedRef());
}
}
}
}
开发者ID:JustDo1989,项目名称:UnrealEngine4.11-HairWorks,代码行数:24,代码来源:NiagaraEmitterPropertiesDetailsCustomization.cpp