I have tried many times as possible as I can.
I wrote below code. Original is below link`s code.
ChildSlot
.VAlign(VAlign_Fill)
.HAlign(HAlign_Fill)
.Padding(FMargin(20))
[
SNew(SOverlay)
+ SOverlay::Slot()
.VAlign(VAlign_Bottom)
.HAlign(HAlign_Right)
.Padding(FMargin(20))
[
SNew(SBorder)
.VAlign(VAlign_Center)
.HAlign(HAlign_Center)
.BorderBackgroundColor(FLinearColor(0, 1, 0, 1))
.BorderImage(&brush)
.Padding(FMargin(20))
[
// Inside lies a text block with these settings
SNew(STextBlock)
.ShadowColorAndOpacity(FLinearColor::Black)
.ColorAndOpacity(FLinearColor::Blue)
.ShadowOffset(FIntPoint(-1, 1))
.Font(FSlateFontInfo("Veranda", 16))
// localized text to be translated with a generic name HelloSlateText
.Text(LOCTEXT("HelloSlateText", "Hello, Slate!"))
]
]
];
And result is this.
Yes. There is no background color just transparent.
When I edited like thisβ¦
SNew(SBorder)
.VAlign(VAlign_Center)
.HAlign(HAlign_Center)
.BorderBackgroundColor(FLinearColor(0, 1, 0, 1))
//.BorderImage(&brush)
.Padding(FMargin(20))
And result isβ¦
See. Only border line has color. It`s not that I want. I want to fill color like working in UMG.
How can I fill color to background? Need any other option or something?
(I wrote this project at 4.20.2)