podgorskiy / bimpy

imgui for python
https://podgorskiy.github.io/bimpy/
MIT License
202 stars 33 forks source link

combining flags doesn't seem possible #7

Closed zoranpopovic closed 5 years ago

zoranpopovic commented 5 years ago

Combining flags doesn't seem possible since each flag is a class where or operator seems to fail bimpy.begin("Hi", flags=bimpy.WindowFlags.AlwaysAutoResize | bimpy.WindowFlags.NoTitleBar)

is there another way to do this?

zoranpopovic commented 5 years ago

my guess is that all combinable flags (not just WIndowFlags) need py:arithmetic() parameter added in the enum definition, for example source should change to:

    py::enum_<ImGuiWindowFlags_>(m, "WindowFlags",  py:arithmetic())
podgorskiy commented 5 years ago

Thanks for reporting! Fixed in ab32019b52a564606c05a02e54a47c8e44eb3784