-
Notifications
You must be signed in to change notification settings - Fork 673
add a way to keep certain widgets inside of visible area #899
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 #881 (comment)
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) so it would be nice to take this into consideration.
