This is a very small change that updates the nanobind submodule to the current master (probably a bad idea, maybe a fixed version would be preferred?) and then changes some code around the Flags enum for buttons to get it working.
Why were these changes needed? The Flags enum was treated as an integer by some functions. It seems with the latests nanobind there has been some changes to the handling of enums, which meant the casting of a enum in python to an int for the bound function does not work. This is possible related to this.
The solution I found was to change the functions to accept enums and perform static_casts when int->enum is needed.
This is a very small change that updates the nanobind submodule to the current master (probably a bad idea, maybe a fixed version would be preferred?) and then changes some code around the Flags enum for buttons to get it working.
Why were these changes needed? The Flags enum was treated as an integer by some functions. It seems with the latests nanobind there has been some changes to the handling of enums, which meant the casting of a enum in python to an int for the bound function does not work. This is possible related to this.
The solution I found was to change the functions to accept enums and perform static_casts when int->enum is needed.