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

Vertical Pins?

Open Stanlyhalo opened this issue 2 years ago • 2 comments

I tried to check the example for this, but it's hard to understand where the vertical pins styling comes into play. Here is a picture of my current state, and my only 2 things I need help with, is making the link direction come from the bottom instead acting like it's coming out of the right side, also, I need help with making it so the pin/link point can be anywhere on the white quad (saw that this can be done in one of the gifs on the readme). image

Stanlyhalo avatar Jan 28 '22 05:01 Stanlyhalo

Well that just happened, figured out it's done through styling. Well my only question left that is unanswered as to be how to make the link start be anywhere on the white area. image

Stanlyhalo avatar Jan 28 '22 05:01 Stanlyhalo

This kind of pin is present in blueprint example: https://github.com/thedmd/imgui-node-editor/blob/687a72f940c76cf5064e13fe55fa0408c18fcbe4/examples/blueprints-example/blueprints-example.cpp#L1101-L1108 Basically you can specify ed::PinPivotRect, node editor will start drawing link from this area. Link is drawn between closest points between source and target. So if you specify whole area on the bottom of "Particle Instance" node, link will connect to the right side. Does this help?

thedmd avatar Feb 08 '22 11:02 thedmd