imgui-node-editor icon indicating copy to clipboard operation
imgui-node-editor copied to clipboard

Disable automatic handling of node drag?

Open bgribble opened this issue 1 year ago • 1 comments

I would like to have an "editing mode" and a "operating mode", where in the "operating mode" the node network is not editable. This allows me to have custom handling of mouse motion, clicks, and dragging to do things like move sliders that are rendered within nodes or other custom behavior.

Is it currently possible to disable handling of dragging? From crawling through the code it looks like one way to do it would be to set the Config.DragButtonIndex to a nonexistent button number, but I'm not sure if I can dynamically change that from frame to frame.

bgribble avatar Jul 12 '24 18:07 bgribble

FWIW, the above hack (temporarily changing the DragButtonIndex to a number that doesn't match a real mouse button) works. The SelectButtonIndexis also set to 0 by default and manages the rubberband box and click-to-select behavior. Use that info as you will!

bgribble avatar Jul 16 '24 12:07 bgribble