template<CRange Range, CFunctionLike Transform, CFunctionLike OnEmpty = TUniqueFunction<TFunction_Return<Transform>()>, CSlotArguments SlotArguments = TFunction_Return<Transform>>
requires (
TFunction_ArgCount<Transform> == 1)
struct Mcro::Slate::TSlots< Range, Transform, OnEmpty, SlotArguments >
Add multiple slots at the same time with the declarative syntax derived from an input data array.
void SMyWidget::Construct(const FArguments& args)
{
ChildSlot
[
SNew(SVerticalBox)
+
TSlots(args._DataArray, [](
const FMyData& data)
{
FText dataText = FText::FromString(data.ToString());
return SVerticalBox::Slot()
. HAlign(HAlign_Fill)
. AutoHeight()
[
SNew(STextBlock)
. Text(dataText)
];
})
+ SVerticalBox::Slot()
. HAlign(HAlign_Fill)
. AutoHeight()
[
SNew(STextBlock)
. Text(INVTEXT("Footer after the list of data"))
]
];
}
TSlots(const Range &range, Transform &&transform, TOptional< OnEmpty > &&onEmpty={})
Definition at line 179 of file Slate.h.