Immediate-Mode-UI / Nuklear

A single-header ANSI C immediate mode cross-platform GUI library
https://immediate-mode-ui.github.io/Nuklear/doc/index.html
Other
9.06k stars 542 forks source link

Upgrade 32-bit user value in nk_handle to 64-bits. #540

Open hapgood-brian opened 1 year ago

hapgood-brian commented 1 year ago

First of all, you have saved me a TON of time with this library and I LOVE IT so much more than the others (I won't mention ImGUI). I did need to make a little hack to get it working with my handle based asset system, however, in my engine. I basically hash the classname gotten from boost::* called pretty_name() and use that as a key into a key-value store (a thread safe C++ wrapper for std::unsorted_map). So... just wondering if you'd be opposed to introducing a new 64-bit member for nk_handle?

I propose:

typedef union {void *ptr; int id; long long id64;} nk_handle;

It would really help me out because every time I pull my Git submodule for Nuklear onto a new box I have to make that change.

Thanks so much.