conversion to smart pointers done but still buggy
This commit is contained in:
@@ -8,6 +8,7 @@ class Node;
|
||||
class Edge : public GraphItem{
|
||||
|
||||
public:
|
||||
Edge() {}
|
||||
Edge(std::shared_ptr<Node> start, std::shared_ptr<Node> end) : start(start), end(end) {}
|
||||
|
||||
std::shared_ptr<Node> start;
|
||||
@@ -24,7 +25,13 @@ class Edge : public GraphItem{
|
||||
float connector_offset = 8.0f;
|
||||
float switches_offset = 25.0f;
|
||||
|
||||
virtual bool GActive() {return active;}
|
||||
|
||||
std::shared_ptr<Node> getNextNode(std::shared_ptr<Node> origin){
|
||||
return start == origin ? end : start;
|
||||
}
|
||||
|
||||
void draw(Vec2D<float> mouse_pos, Camera2D cam) {
|
||||
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user