本文整理汇总了C++中TSharedRef::CreatePropertyValueWidget方法的典型用法代码示例。如果您正苦于以下问题:C++ TSharedRef::CreatePropertyValueWidget方法的具体用法?C++ TSharedRef::CreatePropertyValueWidget怎么用?C++ TSharedRef::CreatePropertyValueWidget使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类TSharedRef
的用法示例。
在下文中一共展示了TSharedRef::CreatePropertyValueWidget方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: GenerateAdditionalTextureWidget
void FSpriteDetailsCustomization::GenerateAdditionalTextureWidget(TSharedRef<IPropertyHandle> PropertyHandle, int32 ArrayIndex, IDetailChildrenBuilder& ChildrenBuilder)
{
IDetailPropertyRow& TextureRow = ChildrenBuilder.AddChildProperty(PropertyHandle);
FText ExtraText;
if (FText* pExtraText = AdditionalTextureLabels.Find(ArrayIndex))
{
ExtraText = *pExtraText;
}
FNumberFormattingOptions NoCommas;
NoCommas.UseGrouping = false;
const FText SlotDesc = FText::Format(LOCTEXT("AdditionalTextureSlotIndex", "Slot #{0}"), FText::AsNumber(ArrayIndex, &NoCommas));
TextureRow.DisplayName(SlotDesc);
TextureRow.ShowPropertyButtons(false);
TextureRow.CustomWidget(false)
.NameContent()
[
CreateTextureNameWidget(PropertyHandle, ExtraText)
]
.ValueContent()
.MaxDesiredWidth(TOptional<float>())
[
PropertyHandle->CreatePropertyValueWidget()
];
}
示例2: GenerateHeaderRowContent
void FReplaceVectorWithLinearColorBuilder::GenerateHeaderRowContent(FDetailWidgetRow& NodeRow)
{
// Only generate a header row if the handle has a valid UProperty.
// Note that it's possible for the Property to be NULL if the property node is an FObjectPropertyNode - however we still want to create children in this case.
if (PropertyHandle->GetProperty() != nullptr)
{
NodeRow.NameContent()
[
PropertyHandle->CreatePropertyNameWidget()
];
if (bIsVectorProperty)
{
// Customization - make FVector look like an FLinearColor
NodeRow.ValueContent()
.MinDesiredWidth(250.0f)
.MaxDesiredWidth(250.0f)
[
CreateColorWidget(PropertyHandle)
];
}
else
{
// Otherwise, use the default property widget
NodeRow.ValueContent()
.MinDesiredWidth(1)
.MaxDesiredWidth(4096)
[
PropertyHandle->CreatePropertyValueWidget()
];
}
}
}
示例3: CustomizeHeader
void FVehicleTransmissionDataCustomization::CustomizeHeader(TSharedRef<IPropertyHandle> StructPropertyHandle, FDetailWidgetRow& HeaderRow, IPropertyTypeCustomizationUtils& StructCustomizationUtils)
{
HeaderRow.
NameContent()
[
StructPropertyHandle->CreatePropertyNameWidget()
]
.ValueContent()
[
StructPropertyHandle->CreatePropertyValueWidget()
];
}
开发者ID:JustDo1989,项目名称:UnrealEngine4.11-HairWorks,代码行数:12,代码来源:VehicleTransmissionDataCustomization.cpp
示例4: CustomizeHeader
void FRawDistributionVectorStructCustomization::CustomizeHeader(TSharedRef<IPropertyHandle> StructPropertyHandle, FDetailWidgetRow& HeaderRow, IPropertyTypeCustomizationUtils& StructCustomizationUtils)
{
const bool bDisplayResetToDefault = false;
const FText DisplayNameOverride = FText::GetEmpty();
const FText DisplayToolTipOverride = FText::GetEmpty();
HeaderRow
.NameContent()
[
StructPropertyHandle->CreatePropertyNameWidget(DisplayNameOverride, DisplayToolTipOverride, bDisplayResetToDefault)
]
.ValueContent()
.MinDesiredWidth(1)
.MaxDesiredWidth(4096)
[
StructPropertyHandle->CreatePropertyValueWidget()
];
}
示例5: CreateGearUIHelper
//Helper function so we can make neutral and reverse look the same as forward gears
void FVehicleTransmissionDataCustomization::CreateGearUIHelper(FDetailWidgetRow & GearsSetup, FText Label, TSharedRef<IPropertyHandle> GearHandle, EGearType GearType)
{
uint32 NumChildren = 0;
GearHandle->GetNumChildren(NumChildren); //we use num of children to determine if we are dealing with a full gear that has ratio, down, up - or just a single value
TSharedRef<SWidget> RatioWidget = (NumChildren > 1 ? GearHandle->GetChildHandle("Ratio")->CreatePropertyValueWidget() : GearHandle->CreatePropertyValueWidget());
TSharedRef<SWidget> DownRatioWidget = (NumChildren > 1 ? GearHandle->GetChildHandle("DownRatio")->CreatePropertyValueWidget() : GearHandle->CreatePropertyValueWidget());
TSharedRef<SWidget> UpRatioWidget = (NumChildren > 1 ? GearHandle->GetChildHandle("UpRatio")->CreatePropertyValueWidget() : GearHandle->CreatePropertyValueWidget());
RatioWidget->SetEnabled(GearType != NeutralGear);
switch (GearType)
{
case ForwardGear:
{
DownRatioWidget->SetEnabled(TAttribute<bool>(this, &FVehicleTransmissionDataCustomization::IsAutomaticEnabled));
UpRatioWidget->SetEnabled(TAttribute<bool>(this, &FVehicleTransmissionDataCustomization::IsAutomaticEnabled));
break;
}
case ReverseGear:
{
DownRatioWidget->SetEnabled(false);
UpRatioWidget->SetEnabled(false);
break;
}
case NeutralGear:
{
DownRatioWidget->SetEnabled(false);
UpRatioWidget->SetEnabled(TAttribute<bool>(this, &FVehicleTransmissionDataCustomization::IsAutomaticEnabled));
break;
}
}
TSharedRef<SWidget> RemoveWidget = PropertyCustomizationHelpers::MakeDeleteButton(FSimpleDelegate::CreateSP(this, &FVehicleTransmissionDataCustomization::RemoveGear, GearHandle), LOCTEXT("RemoveGearToolTip", "Removes gear"));
RemoveWidget->SetEnabled(NumChildren > 1);
GearsSetup
.NameContent()
[
SNew(STextBlock)
.Text(Label)
.Font(IDetailLayoutBuilder::GetDetailFont())
]
.ValueContent()
.MaxDesiredWidth(GearColumnsWidth)
.MinDesiredWidth(GearColumnsWidth)
[
SNew(SHorizontalBox)
+ SHorizontalBox::Slot()
.FillWidth(0.3333f)
[
RatioWidget
]
+ SHorizontalBox::Slot()
.FillWidth(0.3333f)
.Padding(4.f)
[
DownRatioWidget
]
+ SHorizontalBox::Slot()
.FillWidth(0.3333f)
.Padding(4.f)
[
UpRatioWidget
]
+ SHorizontalBox::Slot()
.Padding(4.f)
.AutoWidth()
[
RemoveWidget
]
];
}
开发者ID:JustDo1989,项目名称:UnrealEngine4.11-HairWorks,代码行数:75,代码来源:VehicleTransmissionDataCustomization.cpp