1
0
mirror of https://github.com/ppy/osu.git synced 2024-11-11 15:07:44 +08:00

Use a fallback sample when a MainMenuButton doesn't provide a click sample

This commit is contained in:
Jamie Taylor 2022-04-15 20:31:59 +09:00
parent 8a55f9b968
commit 8e6c015856
No known key found for this signature in database
GPG Key ID: 2ACFA8B6370B8C8C

View File

@ -185,8 +185,7 @@ namespace osu.Game.Screens.Menu
private void load(AudioManager audio)
{
sampleHover = audio.Samples.Get(@"Menu/button-hover");
if (!string.IsNullOrEmpty(sampleName))
sampleClick = audio.Samples.Get($@"Menu/{sampleName}");
sampleClick = audio.Samples.Get(!string.IsNullOrEmpty(sampleName) ? $@"Menu/{sampleName}" : @"UI/button-select");
}
protected override bool OnMouseDown(MouseDownEvent e)