Skip to content

Instantly share code, notes, and snippets.

@pnegri
Created August 20, 2014 14:55
Show Gist options
  • Save pnegri/209162c5b06184d638c8 to your computer and use it in GitHub Desktop.
Save pnegri/209162c5b06184d638c8 to your computer and use it in GitHub Desktop.
SNew(SListView< FString* >)
.ItemHeight(24)
.ListItemsSource( &Items )
// Need to learn how to use OnGenerateRow
.OnGenerateRow(this, &SGameUIComposition::OnGenerateRowForList)
.HeaderRow
(
SNew(SHeaderRow)
+ SHeaderRow::Column("Skill").DefaultLabel(FText::FromString("Skill"))
)
TSharedRef<ITableRow> OnGenerateRowForList(FString InItem, const TSharedRef<STableViewBase>& OwnerTable)
{
return SNew(STableRow< TSharedPtr<SWidget> >, OwnerTable)
[
SNew(STextBlock).Text(FText::FromString(*InItem))
];
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment