1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-28 02:43:19 +08:00

Re-enable sample playback for PasswordEntryPopover and remove sampleJoin playback instead

This commit is contained in:
Jamie Taylor 2023-08-24 18:04:47 +09:00
parent 75750957c7
commit 2e27a476bb
No known key found for this signature in database
GPG Key ID: 2ACFA8B6370B8C8C
2 changed files with 3 additions and 13 deletions

View File

@ -31,8 +31,6 @@ namespace osu.Game.Graphics.UserInterfaceV2
// required due to LoadAsyncComplete() calling PopOut() during load - similar workaround to `OsuDropdownMenu`
private bool wasOpened;
protected virtual bool PlayPopInOutSamples => true;
public OsuPopover(bool withPadding = true)
{
Content.Padding = withPadding ? new MarginPadding(20) : new MarginPadding();
@ -64,11 +62,8 @@ namespace osu.Game.Graphics.UserInterfaceV2
this.ScaleTo(1, scale_duration, Easing.OutElasticHalf);
this.FadeIn(fade_duration, Easing.OutQuint);
if (PlayPopInOutSamples)
{
samplePopIn?.Play();
wasOpened = true;
}
samplePopIn?.Play();
wasOpened = true;
}
protected override void PopOut()
@ -76,7 +71,7 @@ namespace osu.Game.Graphics.UserInterfaceV2
this.ScaleTo(0.7f, scale_duration, Easing.OutQuint);
this.FadeOut(fade_duration, Easing.OutQuint);
if (wasOpened && PlayPopInOutSamples)
if (wasOpened)
samplePopOut?.Play();
}

View File

@ -170,7 +170,6 @@ namespace osu.Game.Screens.OnlinePlay.Lounge
if (Room.HasPassword.Value)
{
sampleJoin?.Play();
this.ShowPopover();
return true;
}
@ -191,10 +190,6 @@ namespace osu.Game.Screens.OnlinePlay.Lounge
protected override bool BlockNonPositionalInput => true;
// When a room is clicked, it already plays a click sound, which clashes pretty badly with the pop in sound.
// Dunno about this one. I'd probably remove the click sound from the panel in cases they are password protected and play these pop in / out sounds.
protected override bool PlayPopInOutSamples => false;
public PasswordEntryPopover(Room room)
{
this.room = room;