mirror of
https://github.com/ppy/osu.git
synced 2025-01-14 22:42:57 +08:00
Add confirm-selection sound in song select
This commit is contained in:
parent
c5aacb75c6
commit
5aa6615107
@ -4,6 +4,8 @@
|
||||
using System.Linq;
|
||||
using OpenTK.Input;
|
||||
using osu.Framework.Allocation;
|
||||
using osu.Framework.Audio;
|
||||
using osu.Framework.Audio.Sample;
|
||||
using osu.Framework.Graphics;
|
||||
using osu.Framework.Graphics.Containers;
|
||||
using osu.Framework.Input;
|
||||
@ -42,9 +44,13 @@ namespace osu.Game.Screens.Select
|
||||
beatmapDetails.Leaderboard.ScoreSelected += s => Push(new Results(s));
|
||||
}
|
||||
|
||||
private SampleChannel sampleConfirm;
|
||||
|
||||
[BackgroundDependencyLoader]
|
||||
private void load(OsuColour colours)
|
||||
private void load(OsuColour colours, AudioManager audio)
|
||||
{
|
||||
sampleConfirm = audio.Sample.Get($@"SongSelect/confirm-selection");
|
||||
|
||||
Footer.AddButton(@"mods", colours.Yellow, modSelect, Key.F1, float.MaxValue);
|
||||
|
||||
BeatmapOptions.AddButton(@"Remove", @"from unplayed", FontAwesome.fa_times_circle_o, colours.Purple, null, Key.Number1);
|
||||
@ -128,6 +134,8 @@ namespace osu.Game.Screens.Select
|
||||
Beatmap.Value.Track.Looping = false;
|
||||
Beatmap.Disabled = true;
|
||||
|
||||
sampleConfirm?.Play();
|
||||
|
||||
LoadComponentAsync(player = new PlayerLoader(new Player()), l => Push(player));
|
||||
}
|
||||
}
|
||||
|
@ -335,7 +335,7 @@ namespace osu.Game.Screens.Select
|
||||
logo.Action = () =>
|
||||
{
|
||||
carouselRaisedStart();
|
||||
return true;
|
||||
return false;
|
||||
};
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user