Immediate-Mode-UI / Immediate-Mode-UI/Nuklear

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

Open
#540 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
C
Stars
11.4k
Forks
686
Avg merge
4d 1h
Merged PRs (30d)
3

Description

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.

Contributor guide

Open the contributing guide

Research direction

Start by locating the nk_handle declaration and its uses throughout the single-header library. Check how pointer and existing 32-bit id values are handled before assessing the proposed 64-bit member. Done means the requested 64-bit user value is available while existing nk_handle usage remains compatible.

Written by the indexing model from the issue text.

Assessment

Tech stack
c
Domain
frontend
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.