4#include "EdGraph/EdGraphSchema.h"
5#include "Templates/SubclassOf.h"
9#include "NewNode_DialogueGraphSchemaAction.generated.h"
23 GENERATED_USTRUCT_BODY();
29 int32 InGrouping, TSubclassOf<UDlgNode> InCreateNodeType
30 ) :
FEdGraphSchemaAction(InNodeCategory, InMenuDesc, InToolTip, InGrouping), CreateNodeType(InCreateNodeType) {}
33 UEdGraphNode* PerformAction(
UEdGraph* ParentGraph, UEdGraphPin* FromPin,
const FVector2D Location,
bool bSelectNewNode =
true)
override;
37 template <
typename GraphNodeType>
38 static GraphNodeType* SpawnGraphNodeWithDialogueNodeFromTemplate(
40 TSubclassOf<UDlgNode> CreateNodeType,
41 const FVector2D Location,
42 bool bSelectNewNode =
true
45 Self Action(FText::GetEmpty(), FText::GetEmpty(), FText::GetEmpty(), 0, CreateNodeType);
46 return CastChecked<GraphNodeType>(Action.
PerformAction(ParentGraph,
nullptr, Location, bSelectNewNode));
57 TSubclassOf<UDlgNode> CreateNodeType;
UCLASS(BlueprintType, Meta = (DisplayThumbnail = "true"))
FNewNode_DialogueGraphSchemaAction Self
UEdGraphNode * CreateNode(UDlgDialogue *Dialogue, UEdGraph *ParentGraph, UEdGraphPin *FromPin, FVector2D Location, bool bSelectNewNode)
FNewNode_DialogueGraphSchemaAction(const FText &InNodeCategory, const FText &InMenuDesc, const FText &InToolTip, int32 InGrouping, TSubclassOf< UDlgNode > InCreateNodeType)
static GraphNodeType * SpawnGraphNodeWithDialogueNodeFromTemplate(UEdGraph *ParentGraph, TSubclassOf< UDlgNode > CreateNodeType, const FVector2D Location, bool bSelectNewNode=true)
TSubclassOf< UDlgNode > CreateNodeType
UEdGraphNode * PerformAction(UEdGraph *ParentGraph, UEdGraphPin *FromPin, const FVector2D Location, bool bSelectNewNode=true) override
FNewNode_DialogueGraphSchemaAction()