2014-12-07 19:09:38 -05:00
|
|
|
// Copyright 1998-2015 Epic Games, Inc. All Rights Reserved.
|
2014-03-14 14:13:41 -04:00
|
|
|
|
|
|
|
|
#pragma once
|
2015-04-10 03:30:54 -04:00
|
|
|
#include "SGraphNode.h"
|
|
|
|
|
|
|
|
|
|
class UAnimStateTransitionNode;
|
2014-03-14 14:13:41 -04:00
|
|
|
|
|
|
|
|
class SGraphNodeAnimTransition : public SGraphNode
|
|
|
|
|
{
|
|
|
|
|
public:
|
|
|
|
|
SLATE_BEGIN_ARGS(SGraphNodeAnimTransition){}
|
|
|
|
|
SLATE_END_ARGS()
|
|
|
|
|
|
|
|
|
|
void Construct(const FArguments& InArgs, UAnimStateTransitionNode* InNode);
|
|
|
|
|
|
|
|
|
|
// SNodePanel::SNode interface
|
2014-06-13 06:14:46 -04:00
|
|
|
virtual void GetNodeInfoPopups(FNodeInfoContext* Context, TArray<FGraphInformationPopupInfo>& Popups) const override;
|
|
|
|
|
virtual void MoveTo(const FVector2D& NewPosition, FNodeSet& NodeFilter) override;
|
|
|
|
|
virtual bool RequiresSecondPassLayout() const override;
|
|
|
|
|
virtual void PerformSecondPassLayout(const TMap< UObject*, TSharedRef<SNode> >& NodeToWidgetLookup) const override;
|
2014-03-14 14:13:41 -04:00
|
|
|
// End of SNodePanel::SNode interface
|
|
|
|
|
|
|
|
|
|
// SGraphNode interface
|
2014-06-13 06:14:46 -04:00
|
|
|
virtual void UpdateGraphNode() override;
|
|
|
|
|
virtual TSharedPtr<SToolTip> GetComplexTooltip() override;
|
2014-03-14 14:13:41 -04:00
|
|
|
// End of SGraphNode interface
|
|
|
|
|
|
|
|
|
|
// SWidget interface
|
2014-06-13 06:14:46 -04:00
|
|
|
void OnMouseEnter(const FGeometry& MyGeometry, const FPointerEvent& MouseEvent) override;
|
|
|
|
|
void OnMouseLeave(const FPointerEvent& MouseEvent) override;
|
2014-03-14 14:13:41 -04:00
|
|
|
// End of SWidget interface
|
|
|
|
|
|
2014-06-18 14:27:15 -04:00
|
|
|
// Calculate position for multiple nodes to be placed between a start and end point, by providing this nodes index and max expected nodes
|
|
|
|
|
void PositionBetweenTwoNodesWithOffset(const FGeometry& StartGeom, const FGeometry& EndGeom, int32 NodeIndex, int32 MaxNodes) const;
|
|
|
|
|
|
2014-03-14 14:13:41 -04:00
|
|
|
static FLinearColor StaticGetTransitionColor(UAnimStateTransitionNode* TransNode, bool bIsHovered);
|
|
|
|
|
private:
|
|
|
|
|
TSharedPtr<STextEntryPopup> TextEntryWidget;
|
|
|
|
|
|
|
|
|
|
private:
|
2015-01-07 09:52:40 -05:00
|
|
|
FText GetPreviewCornerText(bool reverse) const;
|
2014-03-14 14:13:41 -04:00
|
|
|
FSlateColor GetTransitionColor() const;
|
|
|
|
|
|
|
|
|
|
TSharedRef<SWidget> GenerateInlineDisplayOrEditingWidget(bool bShowGraphPreview);
|
|
|
|
|
TSharedRef<SWidget> GenerateRichTooltip();
|
|
|
|
|
|
|
|
|
|
FString GetCurrentDuration() const;
|
|
|
|
|
};
|