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

Add callback for when a submenu is opened #6439

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

nekodex
Copy link
Contributor

@nekodex nekodex commented Nov 28, 2024

To be used by lazer for improved menu audio feedback (ppy/osu#30910)

Comment on lines +586 to +588
// Check if submenu has changed before firing, to prevent extraneous callbacks (e.g. re-hovering the triggeringItem of an already open submenu)
if (submenuChanged)
OnSubmenuOpen?.Invoke(submenu);
Copy link
Member

Choose a reason for hiding this comment

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

Sounds like you want to be triggering this event inside the conditional above in the else branch where the submenu was closed and becomes open?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants