Files
UnrealEngineUWP/Engine/Source/Editor/GraphEditor/Private/AnimationStateNodes/SGraphNodeAnimTransition.h
Ben Cosh e90a7467ff Added a movement filter to the node movement call, which now adds any successfully moved nodes. This prevents duplicate movement if two selected comments try to move the same node.
#TTP 314475 - k2: comment boxes within other comment boxes do not move if the outer most box is moved. Also, if two nested comment boxes are moved, the nodes within move 2x as much as they should (video)
#Branch UE4
#Proj GraphEditor, BehaviourTreeEditor

#Add SNodePanel::SNode::FNodeSet typedef for conveniance and clarity
#Change Changed SNodePanel::MoveTo to take an FNodeSet as an exclusion filter on the moved nodes, once moved nodes are appended into this set.

CodeReview Chris.Wood, Nick.Whiting

[CL 2064255 by Ben Cosh in Main branch]
2014-05-06 04:45:44 -04:00

44 lines
1.5 KiB
C++

// Copyright 1998-2014 Epic Games, Inc. All Rights Reserved.
#pragma once
class SGraphNodeAnimTransition : public SGraphNode
{
public:
SLATE_BEGIN_ARGS(SGraphNodeAnimTransition){}
SLATE_END_ARGS()
void Construct(const FArguments& InArgs, UAnimStateTransitionNode* InNode);
// SNodePanel::SNode interface
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;
// End of SNodePanel::SNode interface
// SGraphNode interface
virtual void UpdateGraphNode() OVERRIDE;
virtual TSharedPtr<SToolTip> GetComplexTooltip() OVERRIDE;
// End of SGraphNode interface
// SWidget interface
void OnMouseEnter(const FGeometry& MyGeometry, const FPointerEvent& MouseEvent) OVERRIDE;
void OnMouseLeave(const FPointerEvent& MouseEvent) OVERRIDE;
// End of SWidget interface
static FLinearColor StaticGetTransitionColor(UAnimStateTransitionNode* TransNode, bool bIsHovered);
private:
TSharedPtr<STextEntryPopup> TextEntryWidget;
private:
FString GetPreviewCornerText(bool reverse) const;
FSlateColor GetTransitionColor() const;
TSharedRef<SWidget> GenerateInlineDisplayOrEditingWidget(bool bShowGraphPreview);
TSharedRef<SWidget> GenerateRichTooltip();
FString GetCurrentDuration() const;
FString GetCurrentAlphaCurveMode() const;
};