Improve MenuButton and OptionButton

* MenuButton + OptionButton: Add method `show_popup()` which performs required popup setup before showing (prefer use of this over `get_popup()->popup()`, otherwise GH #66308 occurs)
* MenuButton: Ensure that the menu can be opened with a shortcut, if one is set for the button. (GH #66403). Ensure that popupmenu item shortcuts are checked first before the MenuButton shortcut.
This commit is contained in:
EricEzaM 2022-10-02 16:46:37 +10:00
parent e69b7083d4
commit 272c297931
6 changed files with 68 additions and 44 deletions

View file

@ -123,6 +123,7 @@ public:
void remove_item(int p_idx);
PopupMenu *get_popup() const;
void show_popup();
virtual void get_translatable_strings(List<String> *p_strings) const override;