Download

How to get a button in the engine source code?

I want to Get the list button of Unreal Engine. Use it alone as my game button. This is the button of the Unreal Resource Browser. It’s called “SAssetTileItem”, but it’s too complicated, and I didn’t find a way to draw rounded buttons and styles.
PJ
There seems to be something about creating this button in UE_5.0EA\Engine\Source\Editor\ContentBrowser\Private\AssetViewWidgets.cpp (I’m not sure)

Code Row 1659:

ChildSlot
	.Padding(FMargin(0.0f, 0.0f, 4.0f, 4.0f))
	[				
		// Drop shadow border
		SNew(SBorder)
		.Padding(FMargin(0.0f, 0.0f, 5.0f, 5.0f))
		.BorderImage(IsFolder() ? TAttribute<const FSlateBrush*>(this, &SAssetTileItem::GetFolderBackgroundShadowImage) : FAppStyle::Get().GetBrush(ItemShadowBorderName))
		[
			SNew(SOverlay)
			.AddMetaData<FTagMetaData>(FTagMetaData(AssetItem->GetItem().GetVirtualPath()))
			+SOverlay::Slot()
			[
				SNew(SBorder)
				.Padding(0)
				.BorderImage(IsFolder() ? TAttribute<const FSlateBrush*>(this, &SAssetTileItem::GetFolderBackgroundImage) : FAppStyle::Get().GetBrush("ContentBrowser.AssetTileItem.ThumbnailAreaBackground"))
				[
					SNew(SVerticalBox)
					// Thumbnail
					+SVerticalBox::Slot()
					.AutoHeight()
					[
						// The remainder of the space is reserved for the name.
						SNew(SBox)
						.Padding(0)
						.WidthOverride(this, &SAssetTileItem::GetThumbnailBoxSize)
						.HeightOverride(this, &SAssetTileItem::GetThumbnailBoxSize)
						[
							ItemContents
						]
					]

					+SVerticalBox::Slot()
					// note this negative padding is intentional to cover up the top part of the rounded border
					.Padding(FMargin(0.0f, -3.0f, 0.0f, 0.0f))
					[
						SNew(SBorder)
						.Padding(FMargin(2.0f, 3.0f))
						.BorderImage(IsFolder() ? FStyleDefaults::GetNoBrush() : FAppStyle::Get().GetBrush("ContentBrowser.AssetTileItem.NameAreaBackground"))
						[
							SNew(SVerticalBox)
							+ SVerticalBox::Slot()
							.Padding(2.0f,2.0f,0.0f,0.0f)
							.VAlign(VAlign_Top)
							[
								SNew(SBox)
								.MaxDesiredHeight(this, &SAssetTileItem::GetNameAreaMaxDesiredHeight)
								[
									SAssignNew(InlineRenameWidget, SInlineEditableTextBlock)
									.Font(this, &SAssetTileItem::GetThumbnailFont)
									.Text(GetNameText())
									.OnBeginTextEdit(this, &SAssetTileItem::HandleBeginNameChange)
									.OnTextCommitted(this, &SAssetTileItem::HandleNameCommitted)
									.OnVerifyTextChanged(this, &SAssetTileItem::HandleVerifyNameChanged)
									.HighlightText(InArgs._HighlightText)
									.IsSelected(InArgs._IsSelectedExclusively)
									.IsReadOnly(this, &SAssetTileItem::IsNameReadOnly)
									.Justification(IsFolder() ? ETextJustify::Center : ETextJustify::Left)
									.LineBreakPolicy(FBreakIterator::CreateCamelCaseBreakIterator())
								]
							]
							+ SVerticalBox::Slot()
							.VAlign(VAlign_Bottom)
							.AutoHeight()
							.Padding(4.0f,0.0f, 0.0f, 2.0f)
							[
								SAssignNew(ClassTextWidget, STextBlock)
								.Visibility(this, &SAssetTileItem::GetAssetClassLabelVisibility)
								.TextStyle(FAppStyle::Get(), "ContentBrowser.ClassFont")
								.TransformPolicy(ETextTransformPolicy::ToUpper)
								.Text(this, &SAssetTileItem::GetAssetClassText)
								.ColorAndOpacity(FSlateColor::UseSubduedForeground())
								//.LineBreakPolicy(FBreakIterator::CreateWordBreakIterator())
							]
							
						]
					]
				]
			]
			+SOverlay::Slot()
			[
				SNew(SImage)
				.Image(this, &SAssetViewItem::GetBorderImage)
				.Visibility(EVisibility::HitTestInvisible)	
			]
		]

type or paste code here

I really Very like this button. Hungry for someone to help me.
God bless everyone who sees this post !