copy/paste partially. z-index experiments, but not working yet.

This commit is contained in:
Sebastian
2024-11-21 02:03:32 +01:00
parent df91a1b107
commit bfc14d5f6e
10 changed files with 172 additions and 139 deletions
+13 -15
View File
@@ -26,15 +26,6 @@ namespace VISEQ::GRAPH::NODES {
Node(float x, float y) : Draggable(Vec2Df(x, y)) {}
Node(Vec2Df p) : Draggable(p) {}
void addConnector() {
connectors.emplace_back(std::make_shared<Connector>(GraphItem::getptr(), position, radius + 5.0f));
connectors.back()->init();
}
void init() {
addConnector();
}
NodeType nodeType;
std::vector<std::shared_ptr<Node>> neighbors;
@@ -49,18 +40,25 @@ namespace VISEQ::GRAPH::NODES {
float radius = 15.0f;
bool config = false;
virtual bool hovering() override {
return STATE != IState::DRAW_SELECTION && CheckCollisionPointCircle(SCREEN_MOUSE, position, radius);
}
void addConnector() {
connectors.emplace_back(std::make_shared<Connector>(GraphItem::getptr(), position, radius + 5.0f));
connectors.back()->init();
}
void init() {
addConnector();
}
virtual NodeType getNodeType() const {return nodeType;}
virtual void SMode(int mode) {};
virtual int GGate() {return 0;};
virtual int GActive() {return 0;};
virtual void trigger() {};
virtual bool hovering() override {
return STATE != APP::InteractionState::DRAW_SELECTION && CheckCollisionPointCircle(SCREEN_MOUSE, position, radius);
}
void update() override{
BASE::Draggable::update();