Code:
void FRadialMenuWidgetDetailsCustomization::CustomizeDetails(IDetailLayoutBuilder& DetailLayout) { // get the array of button structs (TArray<FRadialMenuButton> ButtonList) ButtonListPropertyHandle = DetailLayout.GetProperty(GET_MEMBER_NAME_CHECKED(URadialMenuWidget, ButtonList)); TArray<TWeakObjectPtr<UObject>> radialMenus; DetailLayout.GetObjectsBeingCustomized(radialMenus); RadialMenuWidget = (URadialMenuWidget*)radialMenus[0].Get(); DetailLayout.EditCategory("Radial Menu - Buttons") .AddCustomRow(NSLOCTEXT("NerveNet", "RadialMenuFunctionsLabel", "Radial Menu Functions")) .WholeRowContent() [ SNew(SVerticalBox) + SVerticalBox::Slot() .AutoHeight() [ SNew(SBorder).Padding(0.0f) [ SNew(SBorder).Padding(0.0f).BorderImage(FEditorStyle::GetBrush("ContentBrowser.ThumbnailShadow")) [ SNew(SBox).Padding(6.0f) [ SAssignNew(DetailsPanel, SBox) ]]] ] ]; if (RadialMenuWidget->ButtonList.IsValidIndex(0)) DetailsPanel->SetContent(GetDetailsView(0)); } TSharedRef<SWidget> FRadialMenuWidgetDetailsCustomization::GetDetailsView(uint32 ButtonIndex) { TSharedPtr<IStructureDetailsView> detailsView; if (!RadialMenuWidget->ButtonList.IsValidIndex(ButtonIndex)) return SNew(SBox); FPropertyEditorModule& PropertyModule = FModuleManager::LoadModuleChecked<FPropertyEditorModule>("PropertyEditor"); FDetailsViewArgs viewArgs; FStructureDetailsViewArgs structViewArgs; TSharedPtr<IPropertyHandleArray> arrayPropertyHandle = ButtonListPropertyHandle->AsArray(); TSharedPtr<IPropertyHandle> arrayStructPropertyHandle = arrayPropertyHandle->GetElement(ButtonIndex); void *structAddr; arrayStructPropertyHandle->GetValueData(structAddr); //FStructOnScope structScope = MakeShareable(new FStructOnScope(FRadialMenuButton::StaticStruct(), (uint8*)structAddr)); FStructOnScope structScope = MakeShareable(new FStructOnScope(FRadialMenuButton::StaticStruct(), (uint8*)&RadialMenuWidget->ButtonList[ButtonIndex])); detailsView = PropertyModule.CreateStructureDetailView(viewArgs, structViewArgs, structScope, LOCTEXT("RadialMenuButtonDetailsLabel", "Radial Menu Button Details")); return detailsView->GetWidget().ToSharedRef(); }
Can someone help me understand what is happening here? All that shows is a blank area inside the borders: