Closed hugle closed 2 months ago
There is no way to access them as an array, but there is a way to set them:
ed.push_style_color(ed.StyleColor.node_bg, ImVec4(0.2, 0.2, 0.2, 1.0))
But I see imgui
style color is done correctly at:
Why not apply the same wrapper?
Or maybe, is the same way imgui
does also applies to imgui_node_editor
? If so, I could create a PR if you don't have capacity for this.
Thanks for the proposition. I'm always happy to accept qualitative PRs :-)
In this case I had already started working on it, so I finished it.
Here is some more information if you want to contribute in a later: This kind of work requires to run the generator. There is some doc about it here: https://pthom.github.io/imgui_bundle/devel_docs/bindings.html, and here: https://pthom.github.io/litgen/litgen_book/00_00_intro.html
First I had to add some manual new methods in the node editor fork: https://github.com/pthom/imgui-node-editor/compare/daccee1e227f50f2636634396d5334b4b081d5a3...cefbd3eec32b22cc7fb96f343a130d6677a67400#diff-805621e5151ef6f5b47901439963a38fa5a9f2bfb7dee7cb6a9f18116bb2fc9f (They are protected by this specific define: IMGUI_BUNDLE_PYTHON_API)
Then I had to add this specific define in the generator options, then rerun the generator: https://github.com/pthom/imgui_bundle/commit/7b61b6cb3786eac22bb09ee3878aaf4e4a9d612f
Cool, @pthom , thanks very much for the fast patch.
Is there a way to set default StyleColor for node editor?
I notice that the c++ signature was not bind into python API for imgui_node_editor. The commended code is here within
Style
class:https://github.com/pthom/imgui_bundle/blob/85d3fafa16794f0eb3d8c6fcf1a7918550ee9591/bindings/imgui_bundle/imgui_node_editor.pyi#L389-L407
Is there a way to access those
Colors
attributes?