Update
This commit is contained in:
@@ -0,0 +1,68 @@
|
||||
#pragma once
|
||||
|
||||
#include "CoreMinimal.h"
|
||||
#include "SGraphNode.h"
|
||||
|
||||
class UDismembermentGraphNode;
|
||||
|
||||
/**
|
||||
* Visual representation of a dismemberment graph node
|
||||
*/
|
||||
class FLESHEDITOR_API SDismembermentGraphNode : public SGraphNode
|
||||
{
|
||||
public:
|
||||
SLATE_BEGIN_ARGS(SDismembermentGraphNode) {}
|
||||
SLATE_END_ARGS()
|
||||
|
||||
void Construct(const FArguments& InArgs, UEdGraphNode* InNode);
|
||||
|
||||
// SGraphNode interface
|
||||
virtual void UpdateGraphNode() override;
|
||||
virtual void CreatePinWidgets() override;
|
||||
virtual void AddPin(const TSharedRef<SGraphPin>& PinToAdd) override;
|
||||
virtual TSharedPtr<SToolTip> GetComplexTooltip() override;
|
||||
virtual FReply OnMouseButtonDown(const FGeometry& MyGeometry, const FPointerEvent& MouseEvent) override;
|
||||
virtual FReply OnMouseButtonUp(const FGeometry& MyGeometry, const FPointerEvent& MouseEvent) override;
|
||||
virtual FReply OnMouseMove(const FGeometry& MyGeometry, const FPointerEvent& MouseEvent) override;
|
||||
virtual void OnMouseEnter(const FGeometry& MyGeometry, const FPointerEvent& MouseEvent) override;
|
||||
virtual void OnMouseLeave(const FPointerEvent& MouseEvent) override;
|
||||
// End of SGraphNode interface
|
||||
|
||||
protected:
|
||||
// Get the dismemberment graph node
|
||||
UDismembermentGraphNode* GetDismembermentGraphNode() const;
|
||||
|
||||
// Get the node title widget
|
||||
TSharedRef<SWidget> GetNodeTitleWidget();
|
||||
|
||||
// Get the node body widget
|
||||
TSharedRef<SWidget> GetNodeBodyWidget();
|
||||
|
||||
// Get the node preview widget
|
||||
TSharedRef<SWidget> GetNodePreviewWidget();
|
||||
|
||||
// Node color
|
||||
FSlateColor GetNodeColor() const;
|
||||
|
||||
// Node title color
|
||||
FSlateColor GetNodeTitleColor() const;
|
||||
|
||||
// Node title text
|
||||
FText GetNodeTitle() const;
|
||||
|
||||
// Node category text
|
||||
FText GetNodeCategory() const;
|
||||
|
||||
// Node description text
|
||||
FText GetNodeDescription() const;
|
||||
|
||||
// Is the node selected
|
||||
bool IsNodeSelected() const;
|
||||
|
||||
// Is the node hovered
|
||||
bool IsNodeHovered() const;
|
||||
|
||||
private:
|
||||
// Is the node hovered
|
||||
bool bIsHovered;
|
||||
};
|
Reference in New Issue
Block a user