You've already forked UnrealEngineUWP
mirror of
https://github.com/izzy2lost/UnrealEngineUWP.git
synced 2026-03-26 18:15:20 -07:00
96 lines
4.0 KiB
C++
96 lines
4.0 KiB
C++
// Copyright 1998-2015 Epic Games, Inc. All Rights Reserved.
|
|
|
|
#pragma once
|
|
|
|
#include "EdGraphSchema_EnvironmentQuery.generated.h"
|
|
|
|
/** Action to add a node to the graph */
|
|
USTRUCT()
|
|
struct FEnvironmentQuerySchemaAction_NewNode : public FEdGraphSchemaAction
|
|
{
|
|
GENERATED_USTRUCT_BODY();
|
|
|
|
/** Template of node we want to create */
|
|
UPROPERTY()
|
|
class UEnvironmentQueryGraphNode* NodeTemplate;
|
|
|
|
|
|
FEnvironmentQuerySchemaAction_NewNode()
|
|
: FEdGraphSchemaAction()
|
|
, NodeTemplate(NULL)
|
|
{}
|
|
|
|
FEnvironmentQuerySchemaAction_NewNode(const FString& InNodeCategory, const FText& InMenuDesc, const FString& InToolTip, const int32 InGrouping)
|
|
: FEdGraphSchemaAction(InNodeCategory, InMenuDesc, InToolTip, InGrouping)
|
|
, NodeTemplate(NULL)
|
|
{}
|
|
|
|
// FEdGraphSchemaAction interface
|
|
virtual UEdGraphNode* PerformAction(class UEdGraph* ParentGraph, UEdGraphPin* FromPin, const FVector2D Location, bool bSelectNewNode = true) override;
|
|
virtual UEdGraphNode* PerformAction(class UEdGraph* ParentGraph, TArray<UEdGraphPin*>& FromPins, const FVector2D Location, bool bSelectNewNode = true) override;
|
|
virtual void AddReferencedObjects( FReferenceCollector& Collector ) override;
|
|
// End of FEdGraphSchemaAction interface
|
|
|
|
template <typename NodeType>
|
|
static NodeType* SpawnNodeFromTemplate(class UEdGraph* ParentGraph, NodeType* InTemplateNode, const FVector2D Location)
|
|
{
|
|
FEnvironmentQuerySchemaAction_NewNode Action;
|
|
Action.NodeTemplate = InTemplateNode;
|
|
|
|
return Cast<NodeType>(Action.PerformAction(ParentGraph, NULL, Location));
|
|
}
|
|
};
|
|
|
|
/** Action to add a subnode to the selected node */
|
|
USTRUCT()
|
|
struct FEnvironmentQuerySchemaAction_NewSubNode : public FEdGraphSchemaAction
|
|
{
|
|
GENERATED_USTRUCT_BODY();
|
|
|
|
/** Template of node we want to create */
|
|
UPROPERTY()
|
|
class UEnvironmentQueryGraphNode_Test* NodeTemplate;
|
|
|
|
/** parent node */
|
|
UPROPERTY()
|
|
class UEnvironmentQueryGraphNode_Option* ParentNode;
|
|
|
|
FEnvironmentQuerySchemaAction_NewSubNode()
|
|
: FEdGraphSchemaAction()
|
|
, NodeTemplate(NULL)
|
|
{}
|
|
|
|
FEnvironmentQuerySchemaAction_NewSubNode(const FString& InNodeCategory, const FText& InMenuDesc, const FString& InToolTip, const int32 InGrouping)
|
|
: FEdGraphSchemaAction(InNodeCategory, InMenuDesc, InToolTip, InGrouping)
|
|
, NodeTemplate(NULL)
|
|
{}
|
|
|
|
// FEdGraphSchemaAction interface
|
|
virtual UEdGraphNode* PerformAction(class UEdGraph* ParentGraph, UEdGraphPin* FromPin, const FVector2D Location, bool bSelectNewNode = true) override;
|
|
virtual UEdGraphNode* PerformAction(class UEdGraph* ParentGraph, TArray<UEdGraphPin*>& FromPins, const FVector2D Location, bool bSelectNewNode = true) override;
|
|
virtual void AddReferencedObjects( FReferenceCollector& Collector ) override;
|
|
// End of FEdGraphSchemaAction interface
|
|
};
|
|
|
|
UCLASS(MinimalAPI)
|
|
class UEdGraphSchema_EnvironmentQuery : public UEdGraphSchema
|
|
{
|
|
GENERATED_UCLASS_BODY()
|
|
|
|
void GetBreakLinkToSubMenuActions(class FMenuBuilder& MenuBuilder, class UEdGraphPin* InGraphPin);
|
|
|
|
// Begin EdGraphSchema interface
|
|
virtual void CreateDefaultNodesForGraph(UEdGraph& Graph) const override;
|
|
virtual void GetGraphContextActions(FGraphContextMenuBuilder& ContextMenuBuilder) const override;
|
|
virtual void GetContextMenuActions(const UEdGraph* CurrentGraph, const UEdGraphNode* InGraphNode, const UEdGraphPin* InGraphPin, class FMenuBuilder* MenuBuilder, bool bIsDebugging) const override;
|
|
virtual const FPinConnectionResponse CanCreateConnection(const UEdGraphPin* A, const UEdGraphPin* B) const override;
|
|
virtual const FPinConnectionResponse CanMergeNodes(const UEdGraphNode* A, const UEdGraphNode* B) const override;
|
|
virtual FLinearColor GetPinTypeColor(const FEdGraphPinType& PinType) const override;
|
|
virtual bool ShouldHidePinDefaultValue(UEdGraphPin* Pin) const override;
|
|
virtual class FConnectionDrawingPolicy* CreateConnectionDrawingPolicy(int32 InBackLayerID, int32 InFrontLayerID, float InZoomFactor, const FSlateRect& InClippingRect, class FSlateWindowElementList& InDrawElements, class UEdGraph* InGraphObj) const override;
|
|
// End EdGraphSchema interface
|
|
|
|
void GetGraphNodeContextActions(FGraphContextMenuBuilder& ContextMenuBuilder) const;
|
|
};
|
|
|