Open Tomislaw opened 4 days ago
Alternatively, we could add selected
to the node or link config (and change it with configure_item
). Then, use ImNodes::SelectNode()
to change it, and ImNodes::IsNodeSelected()
to update it from ImNodes...
However, at the moment, ImNodes::IsNodeSelected()
is slow (it performs a linear search in std::vector
), so it might be better to use dedicated functions (set/get_selected_nodes
) rather than a per-node config field.
As name suggest, It would be great to have methods for selecting node editor items programmatically.
I tried to implement node duplication callback, and I would want to mark new duplicated nodes as selected. Unfortunately, I was unable to achieve this result.