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

Change menus to fade out with a slight delay so settings changes are visible #31779

Merged
merged 3 commits into from
Feb 5, 2025

Conversation

peppy
Copy link
Member

@peppy peppy commented Feb 3, 2025

Useful for cases like #31778, where a change to one setting can affect another.

osu.2025-02-03.at.08.36.58.mp4

…visible

Useful for cases like ppy#31778, where a
change to one setting can affect another.
@bdach bdach self-requested a review February 3, 2025 11:06
Comment on lines 71 to 72
this.Delay(50)
.FadeOut(300, Easing.OutQuint);
Copy link
Collaborator

Choose a reason for hiding this comment

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

Did / do you want this change to also apply to context menus? Asking because OsuContextMenu overrides AnimateClose() and does not call base:

protected override void AnimateClose()
{
this.FadeOut(fade_duration, Easing.OutQuint);
if (wasOpened)
menuSamples.PlayCloseSample();
wasOpened = false;
}

so closes on context menus are still not delayed on this branch as it is.

Copy link
Member Author

Choose a reason for hiding this comment

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

Have applied this, good catch.

@Joehuu Joehuu self-requested a review February 4, 2025 20:22
Copy link
Member

@Joehuu Joehuu left a comment

Choose a reason for hiding this comment

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

This somewhat resolves #12894, but I can still see the illusion of two checkmarks if I'm focusing hard enough. FWIW the OP video that had the 300ms fade out before improves that situation for me.

This also makes it possible to double-click a menu, but maybe not a problem?

@peppy
Copy link
Member Author

peppy commented Feb 5, 2025

I can still see the illusion of two checkmarks if I'm focusing hard enough

Potentially a monitor ghosting issue. Not really much can be done here, it's already an immediate hide.

This also makes it possible to double-click a menu, but maybe not a problem?

Doesn't really change that, just makes it more possible. I'll see what I can do.

@pull-request-size pull-request-size bot added size/M and removed size/S labels Feb 5, 2025
@peppy
Copy link
Member Author

peppy commented Feb 5, 2025

I tried to fix the clicking-during-fade but it's not easy (the click handling is in the item itself which has no knowledge of the menu's state). Probably best left for another time.

I did end up doing a refactor to avoid the mind-boggling Animate method implementations. Pretty annoying change to review due to the flags involved, but I've checked that the sounds still sound correct to the best of my ability.

@peppy peppy requested a review from bdach February 5, 2025 07:36
Copy link
Collaborator

@bdach bdach left a comment

Choose a reason for hiding this comment

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

audibly the refactor commit seems correct.

i give it a ~20% chance that someone is going to complain about the delay but let's see if it actually happens

@bdach bdach merged commit 4f62947 into ppy:master Feb 5, 2025
10 checks passed
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.

3 participants