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

Add picture to the node background

Open aabilityuk opened this issue 2 years ago • 5 comments

Hi, first of all I want to thank the developers for efforts and spent time for lib dev!

Is it possible to add picture to the node background and custom setup the pins distance and positions inside of the node?

If not, is there any plans in future to add this feature?

Thank you!

aabilityuk avatar Jul 26 '21 05:07 aabilityuk

I'm curious to know about that one !

SadE54 avatar Jul 29 '21 15:07 SadE54

It seems like there is no support for this library! I ask the second or even third question., but no answer

aabilityuk avatar Jul 29 '21 16:07 aabilityuk

The developer has a life too. Let him some time to answer!

Le jeu. 29 juil. 2021 à 18:41, aabilityuk @.***> a écrit :

It seems like there is no support for this library! I ask the second or even third question., but no answer

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/thedmd/imgui-node-editor/issues/117#issuecomment-889298465, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAV62MAPQAMO6GCLVLXGY33T2GADNANCNFSM5A7LAQPA .

SadE54 avatar Jul 29 '21 16:07 SadE54

The developer has a life too. Let him some time to answer! Le jeu. 29 juil. 2021 à 18:41, aabilityuk @.***> a écrit :

That is for sure

aabilityuk avatar Jul 29 '21 17:07 aabilityuk

Hi, sorry for late response. Both work and vacation without internet happened in very quick succession.

Back to the topic. You can draw on node background using:

ImDrawList* GetNodeBackgroundDrawList(NodeId nodeId);

It is used in blueprints demo to draw textured title part on the node (see: code). image You can adjust node style to make background fully transparent and draw your own if you wish. You can use ImDrawListSplitter to split draw list to multiple channels furthers for layering.

thedmd avatar Jul 30 '21 04:07 thedmd