Nuklear icon indicating copy to clipboard operation
Nuklear copied to clipboard

Menubar menu header hover open

Open Dodzey opened this issue 1 year ago • 1 comments

Support switching menu by hovering over menubar headers while a menu is active. This matches typical menu bar behaviour in most GUIs.

2024-09-01 20 16 59

Dodzey avatar Sep 01 '24 18:09 Dodzey

There is one small downside with my current approach, If I set the window containing the menubar to NK_WINDOW_BACKGROUND, and overlap the menubar item headers with another window etc, then I can still activate them. I'm not sure there is a way to get NK_WIDGET_STATE_HOVER from the header button (ctx->last_widget_state after it is processed) as the popup window seems to stop those state flags being set - which makes sense I guess - but means the direct mouse rect test is the only way I can think to do this?

This is probably not a particularly common use case though - typically a menubar will be at the top of a window, or drawn at the top of the application as a window with no borders etc I would imagine.

Dodzey avatar Sep 01 '24 20:09 Dodzey