Immediate-Mode-UI / Immediate-Mode-UI/Nuklear
There can be only one Popup at the same time
- Dominant language
- C
- Stars
- 11.4k
- Forks
- 686
- Avg merge
- 4d 1h
- Merged PRs (30d)
- 3
Description
I believe, this was already indirectly mentioned in several other issues. Examples:
- https://github.com/Immediate-Mode-UI/Nuklear/issues/660
- https://github.com/Immediate-Mode-UI/Nuklear/issues/683
- https://github.com/Immediate-Mode-UI/Nuklear/issues/168
There are multiple places in the library where, if you attempt to spawn another Popup, it will either trigger an assert or silently fail and do nothing. Example:
https://github.com/Immediate-Mode-UI/Nuklear/blob/171090c8e21584330207544dbde5e7c1ec581135/src/nuklear_popup.c#L29-L31
This is quite annoying because few widgets use Popups under the hood (e.g. Menus) and so this limitation is not always clear.
Right now, it prevents creation of nested context menus, ["cascading menus"](https://github.com/Immediate-Mode-UI/Nuklear/issues/314), stacked modals, and so on... For comparison, DearImGui does not have this problem.
Is there a specific reason why this limitation exists?
Are Popups implemented in a way, where supporting multiple of them would be a problem?
Thanks.
Contributor guide
Research direction
Start with src/nuklear_popup.c at lines 29–31, then review the related popup behavior and linked issues 660, 683, 168, and 314. Determine how popup state currently prevents multiple instances and whether nested context menus, cascading menus, and stacked modals can be supported. Done means additional popups no longer assert or silently fail.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- c
- Domain
- frontend
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100