Closed kfields closed 2 years ago
Hi @kfields !
Adding the ability to define ImNodesMiniMapNodeHoveringCallback
in a user-provided header is something we can do. 👍 I'm aware of a few other binding projects, so this proposal would probably benefit multiple projects.
I would accept PRs for this if you would like to submit the functionality which works on your end.
(BTW, I noticed you have ImNodesMiniMapNodeHoveringCallback defined in both imnodes.h and imnodes_internal.h. Looks like an oversight)
Yep, it is! Thanks for pointing that out, I'll get it fixed.
That makes sense. Maybe I can identify other useful stuff to make user customizable. I'll try to get a PR together over the weekend. Thanks!
Thanks for the merge! Issue closed.
Hi! I'm wrapping ImNodes with pybind11 and it's going pretty well. Right now I'm trying to wrap MiniMap. I just need a way wrap callbacks with py::function
If you would allow user defined callbacks like ImGui does that would be great. Also, It would be nice to have a custom include header like ImGui does also, for instance in imnodes.h you would have to add:
Wrap callbacks in #ifndef's (BTW, I noticed you have ImNodesMiniMapNodeHoveringCallback defined in both imnodes.h and imnodes_internal.h. Looks like an oversight)
And then in my 'imnodesconfig.h'
At least that's the plan. I was able to do this with ImGui::AddCallback to do custom drawing within python so it is doable. Nice job on the library! Thanks!