A Demo Project for the UnrealEngineSDK
Loading...
Searching...
No Matches
DialogueGraphFactories.cpp
Go to the documentation of this file.
1
// Copyright Csaba Molnar, Daniel Butum. All Rights Reserved.
2
#include "
DialogueGraphFactories.h
"
3
4
#include "K2Node.h"
5
6
#include "
DialogueEditor/Nodes/DialogueGraphNode_Base.h
"
7
#include "
DialogueEditor/Nodes/DialogueGraphNode_Edge.h
"
8
#include "
DialogueEditor/Nodes/DialogueGraphNode_Root.h
"
9
#include "
DialogueEditor/Nodes/SDialogueGraphNode.h
"
10
#include "
DialogueEditor/Nodes/SDialogueGraphNode_Root.h
"
11
#include "
DialogueEditor/Nodes/SDialogueGraphNode_Edge.h
"
12
#include "
DialogueEditor/Nodes/SDialogueGraphPin.h
"
13
#include "
BlueprintNodes/DialogueK2Node_Select.h
"
14
#include "
BlueprintNodes/SGraphNode_DialogueK2Select.h
"
15
#include "
BlueprintNodes/SGraphNode_DialogueK2Switch.h
"
16
#include "
BlueprintNodes/DialogueK2Node_SwitchDialogueCallback.h
"
17
18
TSharedPtr<class SGraphNode>
FDialogueGraphNodeFactory::CreateNode
(
class
UEdGraphNode
* InNode)
const
19
{
20
// Dialogue Editor Nodes
21
if
(
UDialogueGraphNode_Base
* DialogueNode_Base = Cast<UDialogueGraphNode_Base>(InNode))
22
{
23
// Nodes
24
if
(
UDialogueGraphNode
* DialogueNode = Cast<UDialogueGraphNode>(DialogueNode_Base))
25
{
26
if
(
UDialogueGraphNode_Root
* DialogueStartNode = Cast<UDialogueGraphNode_Root>(DialogueNode))
27
{
28
return
SNew(
SDialogueGraphNode_Root
, DialogueStartNode);
29
}
30
31
return
SNew(
SDialogueGraphNode
, DialogueNode);
32
}
33
34
// Edge
35
if
(
UDialogueGraphNode_Edge
* DialogueEdge = Cast<UDialogueGraphNode_Edge>(DialogueNode_Base))
36
{
37
return
SNew(
SDialogueGraphNode_Edge
, DialogueEdge);
38
}
39
}
40
41
// Blueprint Editor Nodes
42
if
(
UK2Node
* BlueprintNode_Base = Cast<UK2Node>(InNode))
43
{
44
if
(
UDialogueK2Node_Select
* BlueprintDialogueSelectNode = Cast<UDialogueK2Node_Select>(BlueprintNode_Base))
45
{
46
return
SNew(
SGraphNode_DialogueK2Select
, BlueprintDialogueSelectNode);
47
}
48
49
if
(
UDialogueK2Node_SwitchDialogueCallback
* BlueprintDialogueSwitchNode = Cast<UDialogueK2Node_SwitchDialogueCallback>(BlueprintNode_Base))
50
{
51
return
SNew(
SGraphNode_DialogueK2Switch
, BlueprintDialogueSwitchNode);
52
}
53
}
54
55
return
nullptr
;
56
}
57
58
TSharedPtr<class SGraphPin>
FDialogueGraphPinFactory::CreatePin
(
class
UEdGraphPin* Pin)
const
59
{
60
if
(Pin->GetSchema()->IsA<
UDialogueGraphSchema
>())
61
{
62
return
SNew(
SDialogueGraphPin
, Pin);
63
}
64
65
return
nullptr
;
66
}
DialogueGraphFactories.h
DialogueGraphNode_Base.h
DialogueGraphNode_Edge.h
DialogueGraphNode_Root.h
DialogueK2Node_Select.h
DialogueK2Node_SwitchDialogueCallback.h
SDialogueGraphNode.h
SDialogueGraphNode_Edge.h
SDialogueGraphNode_Root.h
SDialogueGraphPin.h
SGraphNode_DialogueK2Select.h
SGraphNode_DialogueK2Switch.h
SDialogueGraphNode_Edge
Definition
SDialogueGraphNode_Edge.h:14
SDialogueGraphNode_Root
Definition
SDialogueGraphNode_Root.h:14
SDialogueGraphNode
Definition
SDialogueGraphNode.h:19
SDialogueGraphPin
Definition
SDialogueGraphPin.h:13
SGraphNode_DialogueK2Select
Definition
SGraphNode_DialogueK2Select.h:11
SGraphNode_DialogueK2Switch
Definition
SGraphNode_DialogueK2Switch.h:12
UDialogueGraphNode_Base
UCLASS(Abstract)
Definition
DialogueGraphNode_Base.h:26
UDialogueGraphNode_Edge
UCLASS()
Definition
DialogueGraphNode_Edge.h:22
UDialogueGraphNode_Root
UCLASS()
Definition
DialogueGraphNode_Root.h:15
UDialogueGraphNode
UCLASS()
Definition
DialogueGraphNode.h:62
UDialogueGraphSchema
UCLASS()
Definition
DialogueGraphSchema.h:25
UDialogueK2Node_Select
UCLASS(MinimalAPI, Meta=(Keywords = "Ternary If"))
Definition
DialogueK2Node_Select.h:29
UDialogueK2Node_SwitchDialogueCallback
UCLASS()
Definition
DialogueK2Node_SwitchDialogueCallback.h:35
UEdGraphNode
UK2Node
FDialogueGraphNodeFactory::CreateNode
TSharedPtr< class SGraphNode > CreateNode(class UEdGraphNode *InNode) const override
Definition
DialogueGraphFactories.cpp:18
FDialogueGraphPinFactory::CreatePin
TSharedPtr< class SGraphPin > CreatePin(class UEdGraphPin *Pin) const override
Definition
DialogueGraphFactories.cpp:58
SDKDemo
Plugins
UnrealEngineSDK
VisualScripter
Source
DlgSystemEditor
Private
Factories
DialogueGraphFactories.cpp
Generated
Tue Jan 28 2025 16:33:11
by Doxygen version
1.10.0