cmdwtf / imgui_toggle

A toggle switch widget for Dear ImGui
https://cmd.wtf/projects#imgui-toggle
BSD Zero Clause License
188 stars 19 forks source link

Single header version #6

Open nimtz opened 1 year ago

nimtz commented 1 year ago

Seems to me that for such a specific feature it could be useful to have a single header version to make project inclusion as simple as possible.

nitz commented 1 year ago

I've been thinking about this a bit.

Primarily, I think it's a good idea; as I'm definitely one to appreciate the ease of use of a header only library too. On the other hand, while this is definitely a specific add-on, the amount of features that it has (and may continue to add in the future,) definitely benefit from the maintainability of separating the code out. If there's an easy (read: scriptable) way to produce a single header from the existing code, that'd be something I would be willing to investigate.

If you were looking for a single header flavor for your own projects and didn't need the more elaborate customization the current HEAD offers, you might want to fork from d88bae1fdbf32e25719a5f2a037e5a47c86329dd, which only had a single header and single C++ file, so it'd be far easier to produce a header only version of manually.