Dear ImGui Bundle: an extensive set of Ready-to-use widgets and libraries, based on ImGui. Start your first app in 5 lines of code, or less. Whether you prefer Python or C++, this pack has your back!
I recently switched over to using imgui_bundle in one of my projects and the python bindings from pyimgui, since imgui_bundle has a newer version of imgui as well as a more pythonic API in some places (for example, window and config flags). So far, it's been great and I was able to translate my backend by adapting the opengl backend examples, since they're so similar to pyimgui.
However, I was wondering if it would be possible to have with block (context manager) support in the future, similar to how pyimgui has support for initializing windows like
with imgui.begin("Name of Window"):
# do stuff
pass
Hopefully it's not too difficult to implement (maybe auto-generated for all begin/end blocks?), it would be a great feature.
Thanks for the suggestion, it is interesting!
I implemented this in 34e692cc095c673483039b1b56f878d3f51ce435
It could not be auto-generated, neither could it replace the bindings in the imgui module.
Instead, the imgui_ctx module provides those.
I recently switched over to using imgui_bundle in one of my projects and the python bindings from pyimgui, since imgui_bundle has a newer version of imgui as well as a more pythonic API in some places (for example, window and config flags). So far, it's been great and I was able to translate my backend by adapting the opengl backend examples, since they're so similar to pyimgui.
However, I was wondering if it would be possible to have with block (context manager) support in the future, similar to how pyimgui has support for initializing windows like
Hopefully it's not too difficult to implement (maybe auto-generated for all begin/end blocks?), it would be a great feature.
Here's the relevant issue from pyimgui from mCoding https://github.com/pyimgui/pyimgui/issues/255