You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello, I have a suggestion for adding the ability to map internal ImNodes data with user defined objects. For example ImLinkData could have a void* field called UserData, which one could set using ImNodes::SetLinkUserData(iint id, void* object) and then receive with void* ImNodes::GetLinkUserData(int id). This could be done for other data structures such as ImPinData, ImNodeData. This would allow the user to have his own object mapped to an imnodes id making working with the library easier.
The current workflow is rendering the entire graph, then checking for if (ImNodes::IsLinkDestroyed(&link_id)) then acquiring the object to it and performing actions with it. With this change one can just query the user pointer and then just cast it.
The text was updated successfully, but these errors were encountered:
Hello, I have a suggestion for adding the ability to map internal ImNodes data with user defined objects. For example ImLinkData could have a void* field called UserData, which one could set using
ImNodes::SetLinkUserData(iint id, void* object)
and then receive withvoid* ImNodes::GetLinkUserData(int id)
. This could be done for other data structures such as ImPinData, ImNodeData. This would allow the user to have his own object mapped to an imnodes id making working with the library easier.The current workflow is rendering the entire graph, then checking for
if (ImNodes::IsLinkDestroyed(&link_id))
then acquiring the object to it and performing actions with it. With this change one can just query the user pointer and then just cast it.The text was updated successfully, but these errors were encountered: