4#include "ConnectionDrawingPolicy.h"
5#include "PropertyHandle.h"
6#include "Toolkits/AssetEditorManager.h"
7#include "EdGraphNode_Comment.h"
33 template <
typename GraphNodeType>
36 FGraphNodeCreator<GraphNodeType> NodeCreator(*ParentGraph);
37 GraphNodeType* GraphNode = NodeCreator.CreateUserInvokedNode(bSelectNewNode);
38 NodeCreator.Finalize();
39 GraphNode->NodePosX = Location.X;
40 GraphNode->NodePosY = Location.Y;
41 GraphNode->SetFlags(RF_Transactional);
66 static void Refresh(
const UEdGraph* Graph,
bool bRestorePreviousSelection);
87 TSubclassOf<UEdGraph> GraphClass,
88 TSubclassOf<UEdGraphSchema> SchemaClass
111 return CastChecked<UDialogueGraph>(Graph)->GetDialogue();
125 const TArray<UDialogueGraphNode*>& GraphNodes,
126 int32 OffsetBetweenColumnsX,
127 int32 OffsetBetweenRowsY,
128 bool bIsDirectionVertical
141 const TSet<UObject*>& SelectedNodes,
142 TArray<UDialogueGraphNode*>& OutSelectedGraphNodes
147 TArray<UDialogueGraphNode*> OutSelectedGraphNodes;
202 static EAppReturnType::Type
ShowMessageBox(EAppMsgType::Type MsgType,
const FString& Text,
const FString& Caption);
207 TArray<FVector2D> GeometryPoints;
208 FGeometryHelper::ConvertToPoints(Geometry, GeometryPoints);
209 return FBox2D(GeometryPoints).IsInside(TestPoint);
221 const TArray<UDialogueGraphNode*>& GraphNodes,
222 const TMap<int32, int32>& OldToNewIndexMap
250 UBlueprint* Blueprint,
252 FName FunctionNameToOpen = NAME_None,
253 bool bForceFullEditor =
true,
254 bool bAddBlueprintFunctionIfItDoesNotExist =
false
265 static UK2Node_Event*
BlueprintGetOrAddEvent(UBlueprint* Blueprint, FName EventName, UClass* EventClassSignature);
268 static UK2Node_Event*
BlueprintGetEvent(UBlueprint* Blueprint, FName EventName, UClass* EventClassSignature);
271 static UEdGraphNode_Comment*
BlueprintAddComment(UBlueprint* Blueprint,
const FString& CommentString, FVector2D Location = FVector2D::ZeroVector);
EDialogueBlueprintOpenType
static bool OpenEditorAndJumpToGraphNode(const UEdGraphNode *GraphNode, bool bFocusIfOpen=false)
static bool DeleteAllDialoguesTextFiles()
static void CopyNodeChildren(const UDialogueGraphNode *FromNode, UDialogueGraphNode *ToNode)
static IAssetEditorInstance * FindEditorForAsset(UObject *Asset, bool bFocusIfOpen)
static void RemapOldIndicesWithNewAndUpdateGUID(const TArray< UDialogueGraphNode * > &GraphNodes, const TMap< int32, int32 > &OldToNewIndexMap)
static bool AreDialogueNodesInSyncWithGraphNodes(const UDlgDialogue *Dialogue)
static bool JumpToGraphNodeIndex(const UDlgDialogue *Dialogue, int32 NodeIndex)
static UDialogueGraphNode_Edge * GetLastTargetGraphEdgeBeforeDrag(const UEdGraph *Graph)
static UK2Node_Event * BlueprintGetOrAddEvent(UBlueprint *Blueprint, FName EventName, UClass *EventClassSignature)
static GraphNodeType * SpawnGraphNodeFromTemplate(UEdGraph *ParentGraph, const FIntPoint &Location, bool bSelectNewNode=true)
static UEdGraph * BlueprintGetFunction(UBlueprint *Blueprint, FName FunctionName, UClass *FunctionClassSignature)
static void TryToCreateDefaultGraph(UDlgDialogue *Dialogue, bool bPrompt=true)
static bool PickChildrenOfClass(const FText &TitleText, UClass *&OutChosenClass, UClass *Class)
static UDlgDialogue * GetDialogueFromGraphNode(const UEdGraphNode *GraphNode)
static UEdGraph * CreateNewGraph(UObject *ParentScope, FName GraphName, TSubclassOf< UEdGraph > GraphClass, TSubclassOf< UEdGraphSchema > SchemaClass)
static TSharedPtr< class IDialogueEditor > GetDialogueEditorForGraph(const UEdGraph *Graph)
static void SetLastTargetGraphEdgeBeforeDrag(const UEdGraph *Graph, UDialogueGraphNode_Edge *InEdge)
static void CloseOtherEditors(UObject *Asset, IAssetEditorInstance *OnlyEditor)
static bool CanConvertSpeechNodesToSpeechSequence(const TSet< UObject * > &SelectedNodes, TArray< UDialogueGraphNode * > &OutSelectedGraphNodes)
static void ReplaceParentConnectionsToNode(const UDialogueGraphNode *OldNode, const UDialogueGraphNode *NewNode)
static bool SaveAllDialogues()
static bool CheckAndTryToFixDialogue(UDlgDialogue *Dialogue, bool bDisplayWarning=true)
static UEdGraphNode_Comment * BlueprintAddComment(UBlueprint *Blueprint, const FString &CommentString, FVector2D Location=FVector2D::ZeroVector)
static bool OpenBlueprintEditor(UBlueprint *Blueprint, EDialogueBlueprintOpenType OpenType=EDialogueBlueprintOpenType::None, FName FunctionNameToOpen=NAME_None, bool bForceFullEditor=true, bool bAddBlueprintFunctionIfItDoesNotExist=false)
static UK2Node_Event * BlueprintGetEvent(UBlueprint *Blueprint, FName EventName, UClass *EventClassSignature)
static bool CanConvertSpeechNodesToSpeechSequence(const TSet< UObject * > &SelectedNodes)
static bool OpenEditorForAsset(const UObject *Asset)
static void AutoPositionGraphNodes(UDialogueGraphNode *RootNode, const TArray< UDialogueGraphNode * > &GraphNodes, int32 OffsetBetweenColumnsX, int32 OffsetBetweenRowsY, bool bIsDirectionVertical)
static bool GetBoundsForSelectedNodes(const UEdGraph *Graph, FSlateRect &Rect, float Padding=0.0f)
static bool RemoveNode(UEdGraphNode *NodeToRemove)
static const TSet< UObject * > GetSelectedNodes(const UEdGraph *Graph)
static bool CanConvertSpeechSequenceNodeToSpeechNodes(const TSet< UObject * > &SelectedNodes)
static bool IsPointInsideGeometry(const FVector2D &TestPoint, const FGeometry &Geometry)
FDialogueEditorUtilities()=delete
static EAppReturnType::Type ShowMessageBox(EAppMsgType::Type MsgType, const FString &Text, const FString &Caption)
static void Refresh(const UEdGraph *Graph, bool bRestorePreviousSelection)
static UEdGraph * BlueprintGetOrAddFunction(UBlueprint *Blueprint, FName FunctionName, UClass *FunctionClassSignature)
static UDlgDialogue * GetDialogueForGraph(const UEdGraph *Graph)
static void LoadAllDialoguesAndCheckGUIDs()
static UDlgNode * GetClosestNodeFromGraphNode(UEdGraphNode *GraphNode)
static void RefreshDetailsView(const UEdGraph *Graph, bool bRestorePreviousSelection)
static bool JumpToGraphNode(const UEdGraphNode *GraphNode)
UCLASS(BlueprintType, Meta = (DisplayThumbnail = "true"))
UCLASS(BlueprintType, Abstract, EditInlineNew, ClassGroup = "Dialogue")