Minor refactoring

This commit is contained in:
Dean Herbert
2022-11-03 20:29:27 +09:00
parent f75c4ba95f
commit f6c376c090
2 changed files with 4 additions and 2 deletions

View File

@ -21,9 +21,11 @@ namespace osu.Game.Graphics.UserInterface
/// </summary> /// </summary>
public class HoverClickSounds : HoverSounds public class HoverClickSounds : HoverSounds
{ {
public Bindable<bool> Enabled = new Bindable<bool>(true);
private Sample sampleClick; private Sample sampleClick;
private Sample sampleClickDisabled; private Sample sampleClickDisabled;
public Bindable<bool> Enabled = new Bindable<bool>(true);
private readonly MouseButton[] buttons; private readonly MouseButton[] buttons;
/// <summary> /// <summary>

View File

@ -124,7 +124,7 @@ namespace osu.Game.Overlays.Toolbar
base.OnHoverLost(e); base.OnHoverLost(e);
} }
protected override HoverSounds CreateHoverSounds(HoverSampleSet sampleSet) => new HoverClickSounds(sampleSet) { Enabled = { Value = true } }; protected override HoverSounds CreateHoverSounds(HoverSampleSet sampleSet) => new HoverClickSounds(sampleSet);
private void cycleDisplayMode() private void cycleDisplayMode()
{ {