Files
UnrealEngineUWP/Engine/Source/Editor/GraphEditor/Private/SoundCueGraphConnectionDrawingPolicy.h
Michael Noland c97e8231bb GraphEditor: Refactored connection drawing policy API to be more flexible, passing a parameter structure around instead of loose values (FConnectionParams)
Remove duplicated implementations of DrawConnection in subclasses that draw non-curved splines, overriding ComputeSplineTangent instead
Upgrade note: Any editor plugins that contain a FConnectionDrawingPolicy subclass will need to update calls to DrawSplineWithArrow, DrawConnection, and DetermineWiringStyle

[CL 2402661 by Michael Noland in Main branch]
2015-01-10 00:31:36 -05:00

51 lines
1.5 KiB
C++

// Copyright 1998-2015 Epic Games, Inc. All Rights Reserved.
#pragma once
#include "ConnectionDrawingPolicy.h"
/////////////////////////////////////////////////////
// FSoundCueGraphConnectionDrawingPolicy
// This class draws the connections for an UEdGraph using a SoundCue schema
class FSoundCueGraphConnectionDrawingPolicy : public FConnectionDrawingPolicy
{
protected:
// Times for one execution pair within the current graph
struct FTimePair
{
double PredExecTime;
double ThisExecTime;
FTimePair()
: PredExecTime(0.0)
, ThisExecTime(0.0)
{
}
};
// Map of pairings
typedef TMap<UEdGraphNode*, FTimePair> FExecPairingMap;
// Map of nodes that preceeded before a given node in the execution sequence (one entry for each pairing)
TMap<UEdGraphNode*, FExecPairingMap> PredecessorNodes;
UEdGraph* GraphObj;
FLinearColor ActiveColor;
FLinearColor InactiveColor;
float ActiveWireThickness;
float InactiveWireThickness;
public:
FSoundCueGraphConnectionDrawingPolicy(int32 InBackLayerID, int32 InFrontLayerID, float ZoomFactor, const FSlateRect& InClippingRect, FSlateWindowElementList& InDrawElements, UEdGraph* InGraphObj);
void BuildAudioFlowRoadmap();
// FConnectionDrawingPolicy interface
virtual void DetermineWiringStyle(UEdGraphPin* OutputPin, UEdGraphPin* InputPin, /*inout*/ FConnectionParams& Params) override;
virtual void Draw(TMap<TSharedRef<SWidget>, FArrangedWidget>& PinGeometries, FArrangedChildren& ArrangedNodes) override;
// End of FConnectionDrawingPolicy interface
};