connecting does weird things!
This commit is contained in:
+16
-4
@@ -18,9 +18,13 @@ namespace VISEQ::GRAPH::NODES {
|
||||
class Node : public BASE::Draggable, public GraphItem{
|
||||
|
||||
public:
|
||||
Node() {}
|
||||
Node(float x, float y) : Draggable(Vec2Df(x, y)) {}
|
||||
Node(Vec2Df p) : Draggable(p) {}
|
||||
Node() {addConnector();}
|
||||
Node(float x, float y) : Draggable(Vec2Df(x, y)) {addConnector();}
|
||||
Node(Vec2Df p) : Draggable(p) {addConnector();}
|
||||
|
||||
void addConnector() {
|
||||
connectors.emplace_back(std::make_shared<Connector>(position, radius + 5.0f));
|
||||
}
|
||||
|
||||
NodeType nodeType;
|
||||
|
||||
@@ -55,7 +59,15 @@ namespace VISEQ::GRAPH::NODES {
|
||||
c->update();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void draw(Vec2Df mp, Camera2D cam) override {}
|
||||
|
||||
void draw() override{
|
||||
for(auto c : connectors){
|
||||
c->draw();
|
||||
}
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
typedef std::shared_ptr<VISEQ::GRAPH::NODES::Node> SPTR_Node;
|
||||
|
||||
Reference in New Issue
Block a user