Nelarius / imnodes

A small, dependency-free node editor for dear imgui
MIT License
2.04k stars 249 forks source link

How to get size of node? #144

Closed CaptainTimberTim closed 2 years ago

CaptainTimberTim commented 2 years ago

Hi, I'm trying to layout the existing nodes in a pattern without them overlapping, but those nodes have user-generated content so I cannot know the dimensions beforehand (at least the height, width I can control). Is there any way to find out how big a node is? It seems that all ImGui procedures like GetItemRectSize do not work. Am I missing something, or is there actually no way of knowing unless you track the dimension yourself?

CaptainTimberTim commented 2 years ago

wow, ok. After working some more with it I accidentally found the procedure I was missing. "GetNodeDimensions(int id) " I don't know how I missed it, well now I know.