imgui-node-editor
imgui-node-editor copied to clipboard
Make nodes/links hover-able
Hi,
During the process of drag and drop a new link, I wonder if there is any way to prevent the editor to show the hover state on certain nodes. I couldn't find anything on the editor at all to get this working.
Cheers!
I saw that we have flags that are supposed to alter this and pretend that links and nodes are disabled, like: StyleColor_HovNodeBorder or StyleColor_HovLinkBorder, would that be the right way to do it?
Ok, I tried with StyleColor_HovLinkBorder, and seems to work.
But I have to do it right before calling ax::NodeEditor::End();, since it seems that the link object can't keep any hover color state at all. Are my assumptions right? Is there any reason why you prefer this way instead of allowing to modify the state of the link before calling ax::NodeEditor::Link, is it memory reason?
Cheers!
PD: Great library
Links does not retain hover or selection colors, they are controlled by the current style. Idea was to keep colors for these states unified across editor.
ax::NodeEditor::End() is a function that draw links, that's why you see color affected.
I may change that, so they remember colors from the time Link is called. Do you need such feature?