ChildSlot
[
SNew(SVerticalBox)
//-----------------------------//
+ SVerticalBox::Slot()
[
SNew(SHorizontalBox)
+ SHorizontalBox::Slot()
[
SNew(SBox)
.HeightOverride(20.0f)
.WidthOverride(60.0f)
[
SNew(STextBlock)
.Text(LOCTEXT("TextDefaultValue0", "test:"))
]
]
+ SHorizontalBox::Slot()
[
SNew(SBox)
.HeightOverride(30.0f)
.WidthOverride(150.0f)
[
SAssignNew(SplitMapBtn, SButton)
.OnClicked(this, &SEventTest::OnButtonClicked)
.Text(LOCTEXT("Split", "SplitMap"))
]
]
+ SHorizontalBox::Slot()
[
SNew(SBox)
.AutoWidth()
[
SNew(SCheckBox)
.OnCheckStateChanged(this, &SEventTest::OnCheckBoxChanged)
.ToolTipText(FText::FromString(TEXT("Sprays the blueprints when checked and mouse down.")))
.IsChecked(this, &SEventTest::OnCheckBoxActive)
]
]
]
];
//
void SEventTest::OnCheckBoxChanged(ECheckBoxState NewState)
{
}
FReply SEventTest::OnButtonClicked()
{
return FReply::Handled();
}
ECheckBoxState OnCheckBoxActive() const
{
return ECheckBoxState::Checked;
}
參考