A Demo Project for the UnrealEngineSDK
Loading...
Searching...
No Matches
DialogueBrowserTreeVariableProperties.h
Go to the documentation of this file.
1// Copyright Csaba Molnar, Daniel Butum. All Rights Reserved.
2#pragma once
3
4#include "CoreMinimal.h"
5
6#include "DlgManager.h"
8
11class UDlgDialogue;
13
15{
18
19public:
20 FDialogueBrowserTreeVariableProperties(const TSet<TWeakObjectPtr<const UDlgDialogue>>& InDialogues);
21
22 // Dialogues:
23 void AddDialogue(TWeakObjectPtr<const UDlgDialogue> Dialogue) override;
24
25 // GraphNodes:
26 bool HasGraphNodeSet(const FGuid& DialogueGUID) { return GraphNodes.Find(DialogueGUID) != nullptr; }
27 TSet<TWeakObjectPtr<const UDialogueGraphNode>>* GetMutableGraphNodeSet(const FGuid& DialogueGUID)
28 {
29 return GraphNodes.Find(DialogueGUID);
30 }
31 const TSet<TWeakObjectPtr<const UDialogueGraphNode>>& GetGraphNodeSet(const FGuid& DialogueGUID) const
32 {
33 auto* SetPtr = GraphNodes.Find(DialogueGUID);
34 check(SetPtr);
35 return *SetPtr;
36 }
37
38 // EdgeNodes:
39 bool HasEdgeNodeSet(const FGuid& DialogueGUID) { return EdgeNodes.Find(DialogueGUID) != nullptr; }
40 TSet<TWeakObjectPtr<const UDialogueGraphNode_Edge>>* GetMutableEdgeNodeSet(const FGuid& DialogueGUID)
41 {
42 return EdgeNodes.Find(DialogueGUID);
43 }
44 const TSet<TWeakObjectPtr<const UDialogueGraphNode_Edge>>& GetEdgeNodeSet(const FGuid& DialogueGUID) const
45 {
46 auto* SetPtr = EdgeNodes.Find(DialogueGUID);
47 check(SetPtr);
48 return *SetPtr;
49 }
50
51protected:
57 TMap<FGuid, TSet<TWeakObjectPtr<const UDialogueGraphNode>>> GraphNodes;
58
64 TMap<FGuid, TSet<TWeakObjectPtr<const UDialogueGraphNode_Edge>>> EdgeNodes;
65};
void AddDialogue(TWeakObjectPtr< const UDlgDialogue > Dialogue) override
TSet< TWeakObjectPtr< const UDialogueGraphNode > > * GetMutableGraphNodeSet(const FGuid &DialogueGUID)
TMap< FGuid, TSet< TWeakObjectPtr< const UDialogueGraphNode_Edge > > > EdgeNodes
const TSet< TWeakObjectPtr< const UDialogueGraphNode_Edge > > & GetEdgeNodeSet(const FGuid &DialogueGUID) const
const TSet< TWeakObjectPtr< const UDialogueGraphNode > > & GetGraphNodeSet(const FGuid &DialogueGUID) const
TSet< TWeakObjectPtr< const UDialogueGraphNode_Edge > > * GetMutableEdgeNodeSet(const FGuid &DialogueGUID)
FDialogueBrowserTreeVariableProperties(const TSet< TWeakObjectPtr< const UDlgDialogue > > &InDialogues)
TMap< FGuid, TSet< TWeakObjectPtr< const UDialogueGraphNode > > > GraphNodes
UCLASS(BlueprintType, Meta = (DisplayThumbnail = "true"))
Definition DlgDialogue.h:85