Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Expose PopupMenu activate_item_by_event method #81621

Merged

Conversation

PrecisionRender
Copy link
Contributor

Fixes #40836

Exposes the method that Controls like MenuButton use to propagate input information to the PopupMenu, so that accelerator and shortcut functionality isn't limited to those Controls.

@PrecisionRender PrecisionRender force-pushed the fix-popup-menu-accelerators branch 2 times, most recently from 4438769 to be7897e Compare September 13, 2023 18:27
@AThousandShips AThousandShips added this to the 4.x milestone Sep 13, 2023
@PrecisionRender
Copy link
Contributor Author

PrecisionRender commented Sep 13, 2023

@AThousandShips Could this be added to the 4.2 milestone? The reason I did this PR is because a serious project I'm working on depends on it.

If not, I'll just use my own fork until it gets merged.

@AThousandShips
Copy link
Member

If it gets approved soon it'll be added to it, but enhancements fit more on a flexible schedule

@PrecisionRender
Copy link
Contributor Author

If it gets approved soon it'll be added to it, but enhancements fit more on a flexible schedule

Got it, thanks for the quick answer.

@PrecisionRender
Copy link
Contributor Author

I've tested this PR with my project. From what I can tell, everything works as intended.

doc/classes/PopupMenu.xml Outdated Show resolved Hide resolved
Copy link
Member

@KoBeWi KoBeWi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

At first I was confused how this solves the issue, but seems like it's the menu's owner's responsibility to call this method. In this case exposing it makes sense, in case users want to make custom menus.

@YuriSizov YuriSizov modified the milestones: 4.x, 4.2 Sep 15, 2023
@YuriSizov YuriSizov added the bug label Sep 15, 2023
@YuriSizov YuriSizov merged commit b797fa1 into godotengine:master Sep 15, 2023
15 checks passed
@YuriSizov
Copy link
Contributor

Thanks!

@PrecisionRender PrecisionRender deleted the fix-popup-menu-accelerators branch September 15, 2023 19:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

PopupMenu accelerators don't work.
4 participants