epezent / implot

Immediate Mode Plotting
MIT License
4.65k stars 517 forks source link

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

Closed ocornut closed 1 year ago

ocornut commented 1 year ago

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.