Selection working partially. Needs global z-index hovering to work reliably.
This commit is contained in:
+4
-4
@@ -25,7 +25,7 @@ namespace VISEQ::GRAPH::NODES {
|
||||
Node(Vec2Df p) : Draggable(p) {}
|
||||
|
||||
void addConnector() {
|
||||
connectors.emplace_back(std::make_shared<Connector>(std::make_shared<GraphItem>(this), position, radius + 5.0f));
|
||||
connectors.emplace_back(std::make_shared<Connector>(GraphItem::getptr(), position, radius + 5.0f));
|
||||
connectors.back()->init();
|
||||
}
|
||||
|
||||
@@ -56,12 +56,12 @@ namespace VISEQ::GRAPH::NODES {
|
||||
virtual void trigger() {};
|
||||
|
||||
virtual bool hovering() override {
|
||||
return CheckCollisionPointCircle(state->screen_mouse, position, radius);
|
||||
return CheckCollisionPointCircle(state->screen_mouse, position, radius);
|
||||
}
|
||||
|
||||
void update() override{
|
||||
|
||||
if(pickedUp()) drag();
|
||||
if(hovering()) state->hovering = true;
|
||||
if(pickedUp() || selected) drag();
|
||||
if(released()) putDown();
|
||||
int free_connectors = 0;
|
||||
for(auto c : connectors){
|
||||
|
||||
Reference in New Issue
Block a user