34 lines
1.1 KiB
C++
34 lines
1.1 KiB
C++
// ©2023 Batty Bovine Productions, LLC. All Rights Reserved.
|
|
|
|
#pragma once
|
|
|
|
#include "Widgets/DeclarativeSyntaxSupport.h"
|
|
#include "Widgets/SCompoundWidget.h"
|
|
|
|
class SEdComboActionGraphNodeIndex : public SCompoundWidget
|
|
{
|
|
public:
|
|
/** Delegate event fired when the hover state of this widget changes */
|
|
DECLARE_DELEGATE_OneParam(FOnHoverStateChanged, bool /* bHovered */);
|
|
|
|
/** Delegate used to receive the background color of the node, depending on hover state and state of other siblings */
|
|
DECLARE_DELEGATE_RetVal_OneParam(FSlateColor, FOnGetBackgroundColor, bool /* bHovered */);
|
|
|
|
SLATE_BEGIN_ARGS(SEdComboActionGraphNodeIndex) {}
|
|
SLATE_ATTRIBUTE(TSharedPtr<SWidget>, OverlayBody)
|
|
|
|
// Events
|
|
SLATE_EVENT(FOnHoverStateChanged, OnHoverStateChanged)
|
|
SLATE_EVENT(FOnGetBackgroundColor, OnGetBackgroundColor)
|
|
SLATE_END_ARGS()
|
|
|
|
void Construct(const FArguments &InArgs);
|
|
|
|
/** Get the color we use to display the rounded border */
|
|
FSlateColor GetBackgroundColor() const { return FSlateColor::UseForeground(); }
|
|
|
|
private:
|
|
/** The OverlayBody used for this widget*/
|
|
TSharedPtr<SWidget> OverlayBody;
|
|
};
|