Skip to content

Magic enum#434

Open
KKhanhH wants to merge 6 commits intomasterfrom
magic_enum
Open

Magic enum#434
KKhanhH wants to merge 6 commits intomasterfrom
magic_enum

Conversation

@KKhanhH
Copy link
Copy Markdown
Collaborator

@KKhanhH KKhanhH commented Mar 24, 2026

Switch out implementation behind enum lua interface to use magic_enum instead of better_enum, which does not require declaring enums with a macro to create a special class, and works on native enum types.
Add templatized unary operator+ to convert enums to underlying type.
Allow TryGet to get enum types directly without needing to cast from underlying.

This change will limit the usable compilers to Clang, GCC and MSVC.

@KKhanhH KKhanhH force-pushed the magic_enum branch 3 times, most recently from c268077 to f4d6fa3 Compare March 27, 2026 06:56
@KKhanhH KKhanhH marked this pull request as ready for review April 6, 2026 06:41
[root.PADinput.PAD1RIGHT_DIRECT] = BTN.DPAD_RIGHT,
};

local AXIS = ControllerAxis;;
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

local AXIS = ControllerAxis;

Copy link
Copy Markdown
Contributor

@Gunoshozo Gunoshozo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍❤️

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants