Dragging and selecting works. Copy / Paste does not copy connectors yet.
This commit is contained in:
+11
@@ -25,6 +25,16 @@ namespace VISEQ::GRAPH::NODES {
|
||||
Node() {}
|
||||
Node(float x, float y) : Draggable(Vec2Df(x, y)) {}
|
||||
Node(Vec2Df p) : Draggable(p) {}
|
||||
|
||||
/*Node(const Node& n){*/
|
||||
/* distributionMode = n.distributionMode;*/
|
||||
/* radius = n.radius;*/
|
||||
/* config = n.config;*/
|
||||
/* position = n.position;*/
|
||||
/* for(auto c : n.connectors){*/
|
||||
/* connectors.emplace_back(std::make_shared<Connector>(*c));*/
|
||||
/* }*/
|
||||
/*}*/
|
||||
|
||||
NodeType nodeType;
|
||||
|
||||
@@ -68,6 +78,7 @@ namespace VISEQ::GRAPH::NODES {
|
||||
}
|
||||
|
||||
void update() override{
|
||||
if(hovering()) state->pushEvent({getPtr(), APP::Interaction::HOVER});
|
||||
if(hovering() && clicked()) state->pushEvent({getPtr(), APP::Interaction::PICKUP});
|
||||
if(pickedUp()) state->pushEvent({getPtr(), APP::Interaction::DRAG});
|
||||
if(picked_up && released()) state->pushEvent({getPtr(), APP::Interaction::PUTDOWN});
|
||||
|
||||
Reference in New Issue
Block a user