is it possible to create something similar to a layer mask but for enums?

Godot Version

4.6.3

basically i want to recreate something similar to mask fields from unity in the godot editor, in this case specifically for selecting multiple enum values at once. kind of like how colliders allow the user to select multiple layers for it to detect.

i wanna use this sort of system right now for allowing weapons to be modified by effects for multiple weapon types, so for example a shotgun/axe hybrid would be affected by items that buff ranged weapons and melee weapons at the same time.

i’ve tried poking around the documentation and online for any info but i can’t seem to find something that fits what i’m looking for, so any help would be appreciated!

If you want a control menu of entries that can be toggled you can do that with CheckButtons in Godot. There is also CheckBoxes and if you want to restrict how many buttons can be toggled at the time there is ButtonGroups.

Tho I don’t know mask fields, I think that is the typical way to get binary values (like a mask) from a menu.

Edit: Enums are just integers in Godot. You can convert a binary mask to a list of integers and vice-versa. So to answer the question in the heading: Yes, it is possible to create a menu which converts into enums.

You could use the @export_flags() annotation.