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

39 lines
1.0 KiB
C++

// ©2023 Batty Bovine Productions, LLC. All Rights Reserved.
#include "SEdComboActionGraphNodeIndex.h"
#include "ComboInputEditor.h"
#include "Settings/FComboActionGraphEditorStyle.h"
void SEdComboActionGraphNodeIndex::Construct(const FArguments &InArgs)
{
FComboInputEditorModule &ComboInputEditorModule = FComboInputEditorModule::Get();
const FSlateBrush* CircleBrush = ComboInputEditorModule.ComboActionGraphEditorStyleSet->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)
]
];
}