dearimgui / dear_bindings

C header (and language binding metadata) generator for Dear ImGui
MIT License
221 stars 12 forks source link

Unexpected values in is_flags_enum #53

Closed pdoane closed 8 months ago

pdoane commented 8 months ago

It looks like all enums are marked currently with is_flags_enum, e.g. from most recent artifacts:

            "name": "ImGuiDir_",
            "original_fully_qualified_name": "ImGuiDir_",
            "is_flags_enum": true,

From the code, it looks like it should only be names that end in Flags:

mod_mark_flags_enums.apply(dom_root, ["Flags", "Flags_"])

Somewhat related - there are enumerations which have multi-bit elements, e.g. with ImGuiPopupFlags it would be helpful to know all the MouseButton cases are a single element. Some languages with "Flags" support can handle multi-bit values and others cannot.

ShironekoBen commented 8 months ago

Oops, yeah, that was a very silly bug I introduced when I was refactoring the metadata properties a bit. Should be fixed now - sorry!

pdoane commented 8 months ago

Thanks!