Immediate-Mode-UI / Immediate-Mode-UI/Nuklear
add a way to keep certain widgets inside of visible area
Nobody has claimed this yet.
- Dominant language
- C
- Stars
- 11.4k
- Forks
- 686
- Avg merge
- 4d 1h
- Merged PRs (30d)
- 3
Description
When talking about _"screen area"_, what we really have in mind is "_the backbuffer that Nuklear is drawing to_". Not to be confused with nk_window or the physical display! (I feel like I only made it more confusing now...)
Follow up from https://github.com/Immediate-Mode-UI/Nuklear/pull/881#discussion_r2746144225
> > It also would be really nice for the tooltip to stay in the available screen space. Right now it just draws outside so you can't see its contents [screenshot below], however, I'm not sure if this problem is solvable right now (like does Nuklear keep the OS Window size somewhere?)
> >
>
> I've thought about the offscreen issue too. I'm sure there's a way but whether it's pretty or backend specific or not is the question. I'll look into it after I finish the rest of it.
^ There are at least few widgets that would benefit from this: definitely Tooltips and MenuBar Items, and probably other stuff based on Popups. I'm also planning to implement "_cascaded menus_" in the future, and those will need some form of screen awareness. In theory: every backend should be able to support this.
Implementation note: some backends can also provide a detailed info about which part of the screen is safe to display something meaningful (e.g. [SDL_GetWindowSafeArea](https://wiki.libsdl.org/SDL3/SDL_GetWindowSafeArea)) so it would be nice to take this into consideration.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the tooltip, menu-bar item, and other popup behavior described in the issue, then review how the backends expose the drawing area and optional safe-area information. Define how widgets should remain within the Nuklear backbuffer, including cascaded menus, and validate the behavior across supported backends.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- c
- Domain
- desktop
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100