Context menu is back, but not quite yet.
This commit is contained in:
+10
-1
@@ -67,12 +67,21 @@ namespace VISEQ::GRAPH::NODES {
|
||||
return GraphItemType::NODE;
|
||||
}
|
||||
|
||||
void clearConnectors(){
|
||||
connectors.clear();
|
||||
update();
|
||||
}
|
||||
|
||||
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});
|
||||
|
||||
if(hovering() && MOUSE_RIGHT.clicked) {
|
||||
selected = true;
|
||||
config = true;
|
||||
state->pushEvent({getPtr(), APP::Interaction::RIGHTCLICK});
|
||||
}
|
||||
int free_connectors = 0;
|
||||
for(auto c : connectors){
|
||||
if(c->partner.expired()) free_connectors++;
|
||||
|
||||
Reference in New Issue
Block a user