Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix for allowing core imgui to use typed ImGuiCol / ImGuiStyleVar enums. #405

Merged
merged 1 commit into from
Sep 24, 2022

Conversation

ocornut
Copy link
Collaborator

@ocornut ocornut commented Sep 20, 2022

I have been experimenting with making some (non-flags) enums use typed C++ enums.
For a few types like ImGuiKey it seemed quite worthwhile are they are useful to see in debugger without a extra cast.
I realized ImGuiCol and ImGuiStyleVar, although less useful, could similarly be strongly typed.
I haven't push the changes to core lib as I noticed it would break build on ImPlot.

Enclosed a few fixes to ensure it should work before and after.
Note the PushStyleVar() signature even used an incorrect type but it didn't matter there.

@epezent epezent merged commit 8879c99 into epezent:master Sep 24, 2022
@ocornut ocornut deleted the fix_for_typed_enums branch April 17, 2023 13:24
Ben1138 pushed a commit to Ben1138/implot that referenced this pull request Oct 2, 2024
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.

2 participants