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.
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 realizedImGuiCol
andImGuiStyleVar
, 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.