ComboInput/Source/ComboInputEditor/Private/Ed/SEdComboActionGraphNodeIndex.cpp
2023-09-29 15:11:48 -04:00

38 lines
1.1 KiB
C++

// ©2023 Batty Bovine Productions, LLC. All Rights Reserved.
#include "SEdComboActionGraphNodeIndex.h"
#include "ComboInputEditor.h"
void SEdComboActionGraphNodeIndex::Construct(const FArguments &InArgs)
{
FComboInputEditorModule &ComboInputEditorModule = FComboInputEditorModule::Get();
const FSlateBrush* CircleBrush = ComboInputEditorModule.GetComboInputEditorStyleSet()->GetBrush(TEXT("MDSStyleSet.Node.IndexCircle"));
ChildSlot
[
SNew(SOverlay)
+SOverlay::Slot()
.HAlign(EHorizontalAlignment::HAlign_Fill)
.VAlign(EVerticalAlignment::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(EHorizontalAlignment::HAlign_Fill)
.VAlign(EVerticalAlignment::VAlign_Fill)
[
SNew(SBorder)
.BorderImage(CircleBrush)
.BorderBackgroundColor(this, &SEdComboActionGraphNodeIndex::GetBackgroundColor)
.Padding(FMargin(4.0f))
.VAlign(EVerticalAlignment::VAlign_Center)
.HAlign(EHorizontalAlignment::HAlign_Center)
]
];
}