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:
parent
75750957c7
commit
2e27a476bb
@ -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();
|
||||
}
|
||||
|
||||
|
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user