Olympe Engine 2.0
2D Game Engine with ECS Architecture
Loading...
Searching...
No Matches
MoveNodeCommand.cpp
Go to the documentation of this file.
1/**
2 * @file MoveNodeCommand.cpp
3 * @brief Implementation of MoveNodeCommand
4 * @author Olympe Engine
5 * @date 2026-02-18
6 */
7
8#include "MoveNodeCommand.h"
9
10namespace Olympe {
11namespace NodeGraph {
12
14 : m_graph(graph)
15 , m_nodeId(nodeId)
16 , m_oldPosition(oldPos)
17 , m_newPosition(newPos)
18{
19}
20
22{
23 if (m_graph != nullptr)
24 {
26 }
27}
28
30{
31 if (m_graph != nullptr)
32 {
34 }
35}
36
38{
39 return "Move Node";
40}
41
42} // namespace NodeGraph
43} // namespace Olympe
ComponentTypeID GetComponentTypeID_Static()
Definition ECS_Entity.h:56
Command for moving a node.
Main document class for a node graph.
bool UpdateNodePosition(NodeId id, Vector2 newPos)
Update node position.
void Undo() override
Undo the command.
void Execute() override
Execute the command.
MoveNodeCommand(GraphDocument *graph, NodeId nodeId, Vector2 oldPos, Vector2 newPos)
std::string GetDescription() const override
Get description of the command.
< Provides AssetID and INVALID_ASSET_ID