ComboInput/Source/ComboInputEditor/Private/Ed/SEdComboActionGraphNodeIndex.cpp
2023-09-27 00:21:59 -04:00

37 lines
925 B
C++

// ©2023 Batty Bovine Productions, LLC. All Rights Reserved.
#include "SEdComboActionGraphNodeIndex.h"
#include "Settings/FComboActionGraphEditorStyle.h"
void SEdComboActionGraphNodeIndex::Construct(const FArguments &InArgs)
{
const FSlateBrush* CircleBrush = FComboActionGraphEditorStyle::GetBrush(TEXT("MDSStyleSet.Node.IndexCircle"));
ChildSlot
[
SNew(SOverlay)
+SOverlay::Slot()
.HAlign(HAlign_Fill)
.VAlign(VAlign_Fill)
[
// Add a dummy box here to make sure the widget doesnt get smaller than the brush
SNew(SBox)
.WidthOverride(CircleBrush->ImageSize.X)
.HeightOverride(CircleBrush->ImageSize.Y)
]
+SOverlay::Slot()
.HAlign(HAlign_Fill)
.VAlign(VAlign_Fill)
[
SNew(SBorder)
.BorderImage(CircleBrush)
.BorderBackgroundColor(this, &SEdComboActionGraphNodeIndex::GetBackgroundColor)
.Padding(FMargin(4.0f))
.VAlign(VAlign_Center)
.HAlign(HAlign_Center)
]
];
}