Skip to content
This repository has been archived by the owner on Jan 26, 2022. It is now read-only.

Use MenuButton instead of custom controls #13

Open
Awkor opened this issue Feb 10, 2019 · 1 comment
Open

Use MenuButton instead of custom controls #13

Awkor opened this issue Feb 10, 2019 · 1 comment
Labels
enhancement New feature or request

Comments

@Awkor
Copy link
Contributor

Awkor commented Feb 10, 2019

Currently the menu bar buttons use custom controls to achieve a similar behavior to MenuButton.

Here's how the MenuButton looks like in the Godot editor:
20190210

We should consider using the MenuButton node because it would:

  • Simplify the tree scene (the addition of menu items is done through code)
  • Ease the handling of shortcuts (MenuButton uses a PopupMenu which allows to specify a ShortCut to each item)
  • Remove the need to manage the opening and closing of each menu (it's handled by default)
  • Allow to use the switch_on_hover property

The only caveat is that there's currently an issue that hides a menu item label when a shortcut is set.

Thoughts?

@yochrisbolton
Copy link
Member

I agree that we should switch to MenuButton, however that bug you linked looks like it could cause some headaches, and isn't slated to be fixed until 3.2 which is a little concerning.

I'm curious if there is an easy workaround so that we can switch to the MenuButton button nodes and still add shortcuts. I also wonder if the bug is only in effect when programmatically adding items / labels?

@yochrisbolton yochrisbolton added the enhancement New feature or request label Feb 10, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants