rokups / ImNodes

Node graph implementation for Dear ImGui. Used in https://github.com/rokups/rbfx
MIT License
656 stars 57 forks source link

How to query for removed connection? #31

Closed flamendless closed 3 years ago

flamendless commented 3 years ago

I've tried GetPendingConnection but it results even if there is no connection. I need to query when a connection that is already connected to a node is removed or delete. Perhaps a function to get state if the connection is deleted using double left click can be added to the API? Looking around i've noticed that that functionality is not exposed (in the sample.cpp)

rokups commented 3 years ago

Sample shows how to detect removed connections. ImNodes::Connection() is used to render an existing connection, and it returns false on the frame when connection was removed.