Skip to content

Support buttons at the root of a MenuBar.#202

Draft
player-03 wants to merge 3 commits intofeathersui:masterfrom
player-03:MenuBar_root_buttons
Draft

Support buttons at the root of a MenuBar.#202
player-03 wants to merge 3 commits intofeathersui:masterfrom
player-03:MenuBar_root_buttons

Conversation

@player-03
Copy link
Contributor

In the unlikely event that this happens, the user probably wants it to be a clickable menu button, not an empty menu. If they really do want an empty menu, they can pass [], as documented in all the hierarchical collections.

In the unlikely event that this happens, the user probably wants it to be a clickable menu button, not an empty menu. If they really do want an empty menu, they can pass `[]`, as documented in all the hierarchical collections.
The previous implementation would trigger them for several incorrect reasons.
@player-03 player-03 marked this pull request as draft December 5, 2025 03:50
@player-03
Copy link
Contributor Author

player-03 commented Dec 5, 2025

I tried to make this work with keyboard controls, but MenuBar doesn't listen for key events unless a sub-menu is open. We could change that, but then we'd have to listen for focus events to know when to remove the stage keyboard listener, and that's a bunch of work for an edge case.

Edit: And it doesn't highlight the button, we'd have to change how that works too.

For now I'll keep this as a draft, in case someone comes up with a better idea.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant