Files
UnrealEngineUWP/Engine/Source/Editor/AnimationBlueprintEditor/Public/AnimationNodes/SAnimationGraphNode.h
T

57 lines
1.9 KiB
C++
Raw Normal View History

2019-12-26 15:33:43 -05:00
// Copyright Epic Games, Inc. All Rights Reserved.
#pragma once
#include "CoreMinimal.h"
#include "Widgets/DeclarativeSyntaxSupport.h"
#include "Input/Reply.h"
#include "Styling/SlateColor.h"
#include "SNodePanel.h"
#include "KismetNodes/SGraphNodeK2Base.h"
#include "Engine/PoseWatch.h"
class UAnimGraphNode_Base;
class ANIMATIONBLUEPRINTEDITOR_API SAnimationGraphNode : public SGraphNodeK2Base
{
public:
SLATE_BEGIN_ARGS(SAnimationGraphNode) {}
SLATE_END_ARGS()
void Construct(const FArguments& InArgs, UAnimGraphNode_Base* InNode);
2021-01-25 08:43:19 -04:00
// Tweak any created pin widgets so they respond to bindings
static void ReconfigurePinWidgetsForPropertyBindings(UAnimGraphNode_Base* InAnimGraphNode, TFunctionRef<TSharedPtr<SGraphPin>(UEdGraphPin*)> InFindWidgetForPin);
protected:
// SWidget interface
virtual void Tick(const FGeometry& AllottedGeometry, const double InCurrentTime, const float InDeltaTime) override;
// End of SWidget interface
// SGraphNode interface
virtual TArray<FOverlayWidgetInfo> GetOverlayWidgets(bool bSelected, const FVector2D& WidgetSize) const override;
virtual TSharedRef<SWidget> CreateTitleWidget(TSharedPtr<SNodeTitle> InNodeTitle) override;
virtual void GetNodeInfoPopups(FNodeInfoContext* Context, TArray<FGraphInformationPopupInfo>& Popups) const override;
// End of SGraphNode interface
private:
// Return Pose View Colour for slate indicator
FSlateColor GetPoseViewColour() const;
FReply SpawnColourPicker();
// Handle the node informing us that the title has changed
void HandleNodeTitleChanged();
/** Keep a reference to the indicator widget handing around */
TSharedPtr<SWidget> IndicatorWidget;
/** Keep a reference to the pose view indicator widget handing around */
TSharedPtr<SWidget> PoseViewWidget;
/** Cache the node title so we can invalidate it */
TSharedPtr<SNodeTitle> NodeTitle;
TWeakObjectPtr<class UPoseWatch> PoseWatch;
};