mirror of
https://github.com/ppy/osu.git
synced 2025-01-12 17:23:22 +08:00
Use a fallback sample when a MainMenuButton doesn't provide a click sample
This commit is contained in:
parent
8a55f9b968
commit
8e6c015856
@ -185,8 +185,7 @@ namespace osu.Game.Screens.Menu
|
|||||||
private void load(AudioManager audio)
|
private void load(AudioManager audio)
|
||||||
{
|
{
|
||||||
sampleHover = audio.Samples.Get(@"Menu/button-hover");
|
sampleHover = audio.Samples.Get(@"Menu/button-hover");
|
||||||
if (!string.IsNullOrEmpty(sampleName))
|
sampleClick = audio.Samples.Get(!string.IsNullOrEmpty(sampleName) ? $@"Menu/{sampleName}" : @"UI/button-select");
|
||||||
sampleClick = audio.Samples.Get($@"Menu/{sampleName}");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override bool OnMouseDown(MouseDownEvent e)
|
protected override bool OnMouseDown(MouseDownEvent e)
|
||||||
|
Loading…
Reference in New Issue
Block a user