Init
This commit is contained in:
@@ -0,0 +1,26 @@
|
||||
// Fill out your copyright notice in the Description page of Project Settings.
|
||||
|
||||
|
||||
#include "SChannelNodeButton.h"
|
||||
|
||||
#include "SButton.h"
|
||||
#include "SlateOptMacros.h"
|
||||
|
||||
BEGIN_SLATE_FUNCTION_BUILD_OPTIMIZATION
|
||||
void SChannelNodeButton::Construct(const FArguments& InArgs, FChannelNode* InChannelNode)
|
||||
{
|
||||
ChannelNode = InChannelNode;
|
||||
OnClickedDelegate = InArgs._OnClickedDelegate;
|
||||
|
||||
ChildSlot
|
||||
[
|
||||
SNew(SButton)
|
||||
.Text(FText::FromString(ChannelNode->GetName()))
|
||||
.OnClicked_Lambda([this]() -> FReply
|
||||
{
|
||||
OnClickedDelegate.ExecuteIfBound(ChannelNode);
|
||||
return FReply::Handled();
|
||||
})
|
||||
];
|
||||
}
|
||||
END_SLATE_FUNCTION_BUILD_OPTIMIZATION
|
||||
Reference in New Issue
Block a user