Text image button
cpp
SNew(SButton)
.ToolTipText(LOCTEXT("key_CustomTextBtn", "Custom Text Btn"))
.ContentPadding(FMargin(0, 5.f, 0, 4.f))
.Content()
[
SNew(SHorizontalBox)
+SHorizontalBox::Slot()
.HAlign(HAlign_Center)
.VAlign(VAlign_Center)
[
SNew(SImage)
.ColorAndOpacity(FSlateColor::UseForeground())
.Image(FAppStyle::Get().GetBrush("Icons.Settings"))
]
+ SHorizontalBox::Slot()
.Padding(FMargin(3, 0, 0, 0))
.VAlign(VAlign_Center)
.AutoWidth()
[
SNew(STextBlock)
.TextStyle(FAppStyle::Get(), "SmallButtonText")
.Text(FText::FromString("AUTO"))
]
]
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25