4#include "Widgets/Views/STreeView.h"
13 :
Super(InDisplayText, InParent)
21 return Parent.Pin()->GetParentParticipantName();
31 return Parent.Pin()->GetParentVariableName();
41 return Parent.Pin()->GetParentClass();
62 FString Output =
"FTextItem { ";
64 auto AddKeyValueField = [&Output](
const FString& Key,
const FString& Value,
const bool bAddSeparator =
true)
70 Output += Key +
" = `" + Value +
"`";
72 auto AddFNameToOutput = [&Output, &AddKeyValueField](
const FString&
Name, FName Value)
74 if (!Value.IsNone() && Value.IsValid())
76 AddKeyValueField(
Name, Value.ToString());
80 AddKeyValueField(
"Text",
DisplayText.ToString(),
false);
88 AddKeyValueField(
"Children Num", FString::FromInt(
Children.Num()));
97 Super(
FText::FromString(TEXT(
"ROOT")), nullptr)
105 const TSharedPtr<FDialogueBrowserTreeNode>& InParent)
106 :
Super(
FText::FromString(TEXT(
"SEPARATOR")), InParent)
114 const FText& InDisplayText,
115 const TSharedPtr<FDialogueBrowserTreeNode>& InParent,
117) :
Super(InDisplayText, InParent)
126 const FText& InDisplayText,
127 const TSharedPtr<FDialogueBrowserTreeNode>& InParent,
128 FName InParticipantName
129) :
Super(InDisplayText, InParent), ParticipantName(InParticipantName)
147 const FText& InDisplayText,
148 const TSharedPtr<FDialogueBrowserTreeNode>& InParent,
150) :
Super(InDisplayText, InParent), VariableName(InVariableName)
168 const FText& InDisplayText,
169 const TSharedPtr<FDialogueBrowserTreeNode>& InParent,
171) :
Super(InDisplayText, InParent), Class(ObjectClass)
179 const FText& InDisplayText,
180 const TSharedPtr<FDialogueBrowserTreeNode>& InParent,
181 FName InParticipantName
182) :
Super(InDisplayText, InParent, InParticipantName)
191 const FText& InDisplayText,
192 const TSharedPtr<FDialogueBrowserTreeNode>& InParent,
193 const TWeakObjectPtr<const UDlgDialogue>& InObject
203 return FReply::Handled();
206 return FReply::Unhandled();
213 const FText& InDisplayText,
214 const TSharedPtr<FDialogueBrowserTreeNode>& InParent,
215 const TWeakObjectPtr<const UDialogueGraphNode>& InObject
216) :
Super(InDisplayText, InParent), GraphNode(InObject)
225 ? FReply::Handled() : FReply::Unhandled();
228 return FReply::Unhandled();
235 const FText& InDisplayText,
236 const TSharedPtr<FDialogueBrowserTreeNode>& InParent,
237 const TWeakObjectPtr<const UDialogueGraphNode_Edge>& InObject
238) :
Super(InDisplayText, InParent), EdgeNode(InObject)
247 ? FReply::Handled() : FReply::Unhandled();
250 return FReply::Unhandled();
EDialogueTreeNodeCategoryType
FDialogueBrowserTreeCategoryNode(const FText &InDisplayText, const TSharedPtr< FDialogueBrowserTreeNode > &InParent, EDialogueTreeNodeCategoryType InCategoryType)
FDialogueBrowserTreeCategoryParticipantNode(const FText &InDisplayText, const TSharedPtr< FDialogueBrowserTreeNode > &InParent, FName InParticipantName)
FDialogueBrowserTreeCustomObjectNode(const FText &InDisplayText, const TSharedPtr< FDialogueBrowserTreeNode > &InParent, UClass *ObjectClass)
FReply OnClick() override
FDialogueBrowserTreeDialogueNode(const FText &InDisplayText, const TSharedPtr< FDialogueBrowserTreeNode > &InParent, const TWeakObjectPtr< const UDlgDialogue > &InObject)
TWeakObjectPtr< const UDlgDialogue > Dialogue
TWeakObjectPtr< const UDialogueGraphNode_Edge > EdgeNode
FDialogueBrowserTreeEdgeNode(const FText &InDisplayText, const TSharedPtr< FDialogueBrowserTreeNode > &InParent, const TWeakObjectPtr< const UDialogueGraphNode_Edge > &InObject)
FReply OnClick() override
FDialogueBrowserTreeGraphNode(const FText &InDisplayText, const TSharedPtr< FDialogueBrowserTreeNode > &InParent, const TWeakObjectPtr< const UDialogueGraphNode > &InObject)
FReply OnClick() override
TWeakObjectPtr< const UDialogueGraphNode > GraphNode
virtual UClass * GetParentClass() const
virtual FName GetParentParticipantName() const
EDialogueTreeNodeCategoryType CategoryType
FDialogueBrowserTreeNode(const FText &InDisplayText, const TSharedPtr< Self > &InParent)
virtual FName GetParentVariableName() const
FName GetParentParticipantName() const override
FDialogueBrowserTreeParticipantNode(const FText &InDisplayText, const TSharedPtr< FDialogueBrowserTreeNode > &InParent, FName InParticipantName)
FDialogueBrowserTreeRootNode()
FDialogueBrowserTreeSeparatorNode(const TSharedPtr< FDialogueBrowserTreeNode > &InParent=nullptr)
FDialogueBrowserTreeVariableNode(const FText &InDisplayText, const TSharedPtr< FDialogueBrowserTreeNode > &InParent, FName InVariableName)
FName GetParentVariableName() const override
static bool OpenEditorAndJumpToGraphNode(const UEdGraphNode *GraphNode, bool bFocusIfOpen=false)
static bool OpenEditorForAsset(const UObject *Asset)
TArray< TSharedPtr< FDialogueBrowserTreeNode > > Children
TWeakPtr< FDialogueBrowserTreeNode > Parent