Files
UnrealEngine/Engine/Plugins/PCG/Source/PCGEditor/Private/PCGSettingsDragDropAction.cpp
Brandyn / Techy fcc1b09210 init
2026-04-04 15:40:51 -05:00

25 lines
866 B
C++

// Copyright Epic Games, Inc. All Rights Reserved.
#include "PCGSettingsDragDropAction.h"
#include "PCGEditorGraph.h"
#include "Schema/PCGEditorGraphSchema.h"
#include "Schema/PCGEditorGraphSchemaActions.h"
FReply FPCGSettingsDragDropAction::DroppedOnPanel(const TSharedRef<class SWidget>& Panel, const FVector2f& ScreenPosition, const FVector2f& GraphPosition, UEdGraph& Graph)
{
if (!Graph.GetSchema()->IsA<UPCGEditorGraphSchema>())
{
return FReply::Unhandled();
}
UPCGEditorGraph* EditorGraph = Cast<UPCGEditorGraph>(&Graph);
if (!ensure(EditorGraph))
{
return FReply::Unhandled();
}
FPCGEditorGraphSchemaAction_NewSettingsElement::MakeSettingsNodesOrContextualMenu(Panel, FDeprecateSlateVector2D(ScreenPosition), &Graph, { SettingsObjectPath }, { FDeprecateSlateVector2D(GraphPosition) }, /*bSelectNewNodes=*/true);
return FReply::Handled();
}