move multiple nodes around with selection box

This commit is contained in:
Sebastian
2024-10-23 00:23:24 +02:00
parent f1860d2597
commit 15ee01cb56
4 changed files with 59 additions and 15 deletions
+4
View File
@@ -53,6 +53,10 @@ class ConnectionManager{
return paths.at(return_path)->v1 == current ? paths.at(return_path)->v2 : paths.at(return_path)->v1;
}
void addConnection(Node *from, Node *to){
connections.emplace(connections.end(), from, to);
}
void drawConnections(Vec2D<float> *mouse_pos, Camera2D *cam){
std::erase_if(connections, [](Connection c){ return c.remove == true;});
for(auto& c : connections){