MCPcopy Create free account
hub / github.com/MothCocoon/FlowGraph / Construct

Method Construct

Source/FlowEditor/Private/Graph/FlowGraphEditor.cpp:31–58  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

29#define LOCTEXT_NAMESPACE "FlowGraphEditor"
30
31void SFlowGraphEditor::Construct(const FArguments& InArgs, const TSharedPtr<FFlowAssetEditor> InAssetEditor)
32{
33 FlowAssetEditor = InAssetEditor;
34 FlowAsset = FlowAssetEditor.Pin()->GetFlowAsset();
35 DetailsView = InArgs._DetailsView;
36
37 DebuggerSubsystem = GEngine->GetEngineSubsystem<UFlowDebuggerSubsystem>();
38
39 BindGraphCommands();
40 CreateDebugMenu();
41
42 SGraphEditor::FArguments Arguments;
43 Arguments._AdditionalCommands = CommandList;
44 Arguments._Appearance = TAttribute<FGraphAppearanceInfo>::CreateSP(this, &SFlowGraphEditor::GetGraphAppearanceInfo);
45 Arguments._GraphToEdit = FlowAsset->GetGraph();
46 Arguments._GraphEvents = InArgs._GraphEvents;
47 Arguments._AutoExpandActionMenu = true;
48 Arguments._GraphEvents.OnSelectionChanged = FOnSelectionChanged::CreateSP(this, &SFlowGraphEditor::OnSelectedNodesChanged);
49 Arguments._GraphEvents.OnNodeDoubleClicked = FSingleNodeEvent::CreateSP(this, &SFlowGraphEditor::OnNodeDoubleClicked);
50 Arguments._GraphEvents.OnTextCommitted = FOnNodeTextCommitted::CreateSP(this, &SFlowGraphEditor::OnNodeTitleCommitted);
51#if ENGINE_MAJOR_VERSION == 5 && ENGINE_MINOR_VERSION < 6
52 Arguments._GraphEvents.OnSpawnNodeByShortcut = FOnSpawnNodeByShortcut::CreateStatic(&SFlowGraphEditor::OnSpawnGraphNodeByShortcut, static_cast<UEdGraph*>(FlowAsset->GetGraph()));
53#else
54 Arguments._GraphEvents.OnSpawnNodeByShortcutAtLocation = FOnSpawnNodeByShortcutAtLocation::CreateStatic(&SFlowGraphEditor::OnSpawnGraphNodeByShortcut, static_cast<UEdGraph*>(FlowAsset->GetGraph()));
55#endif
56
57 SGraphEditor::Construct(Arguments);
58}
59
60bool SFlowGraphEditor::GetValidExecBreakpointPinContext(const UEdGraphPin* Pin, FGuid& OutNodeGuid, FName& OutPinName)
61{

Callers

nothing calls this directly

Calls 2

ConstructFunction · 0.85
GetFlowAssetMethod · 0.45

Tested by

no test coverage detected