8#include "../BTNodeGraphManager.h"
15 : m_graph(
graph), m_nodeIds(nodeIds)
36 return "Copy " + std::to_string(
m_nodeIds.size()) +
" node(s)";
41 : m_graph(
graph), m_offsetX(offsetX), m_offsetY(offsetY)
75 : m_graph(
graph), m_originalNodeIds(nodeIds), m_offsetX(offsetX), m_offsetY(offsetY)
Concrete command implementations for BehaviorTree operations.
ComponentTypeID GetComponentTypeID_Static()
bool Undo() override
Undo the command (reverse operation)
CopyNodesCommand(NodeGraph *graph, const std::vector< int > &nodeIds)
std::vector< int > m_nodeIds
bool Execute() override
Execute the command (forward operation)
std::string GetDescription() const override
Get a human-readable description of the command.
std::string GetDescription() const override
Get a human-readable description of the command.
std::vector< int > m_originalNodeIds
DuplicateNodeCommand(NodeGraph *graph, const std::vector< int > &nodeIds, float offsetX=30.0f, float offsetY=30.0f)
bool Execute() override
Execute the command (forward operation)
std::vector< int > m_duplicatedNodeIds
bool Undo() override
Undo the command (reverse operation)
bool DeleteNode(int nodeId)
void CopyNodesToClipboard(const std::vector< int > &nodeIds)
std::vector< int > PasteNodesFromClipboard(float offsetX=30.0f, float offsetY=30.0f)
std::vector< int > DuplicateNodes(const std::vector< int > &nodeIds, float offsetX=30.0f, float offsetY=30.0f)
bool Execute() override
Execute the command (forward operation)
std::string GetDescription() const override
Get a human-readable description of the command.
PasteNodesCommand(NodeGraph *graph, float offsetX=30.0f, float offsetY=30.0f)
std::vector< int > m_pastedNodeIds
bool Undo() override
Undo the command (reverse operation)
< Provides AssetID and INVALID_ASSET_ID