mirror of
https://github.com/ppy/osu.git
synced 2025-01-14 19:22:56 +08:00
Don't play metronome click when tapping for timing
This commit is contained in:
parent
d47a3bb8e4
commit
96ccd29bdc
@ -38,6 +38,8 @@ namespace osu.Game.Screens.Edit.Timing
|
||||
[Resolved]
|
||||
private OverlayColourProvider overlayColourProvider { get; set; }
|
||||
|
||||
public bool EnableClicking { get; set; } = true;
|
||||
|
||||
[BackgroundDependencyLoader]
|
||||
private void load(AudioManager audio)
|
||||
{
|
||||
@ -281,6 +283,9 @@ namespace osu.Game.Screens.Edit.Timing
|
||||
|
||||
Schedule(() =>
|
||||
{
|
||||
if (!EnableClicking)
|
||||
return;
|
||||
|
||||
var channel = clunk?.GetChannel();
|
||||
|
||||
if (channel != null)
|
||||
|
@ -30,6 +30,8 @@ namespace osu.Game.Screens.Edit.Timing
|
||||
{
|
||||
public const float SIZE = 100;
|
||||
|
||||
public readonly BindableBool IsHandlingTapping = new BindableBool();
|
||||
|
||||
[Resolved]
|
||||
private OverlayColourProvider colourProvider { get; set; } = null!;
|
||||
|
||||
@ -213,6 +215,7 @@ namespace osu.Game.Screens.Edit.Timing
|
||||
const double in_duration = 100;
|
||||
|
||||
grabbedMouseDown = true;
|
||||
IsHandlingTapping.Value = true;
|
||||
|
||||
handleTap();
|
||||
|
||||
@ -269,6 +272,7 @@ namespace osu.Game.Screens.Edit.Timing
|
||||
light.Hide();
|
||||
|
||||
tapTimings.Clear();
|
||||
IsHandlingTapping.Value = false;
|
||||
}
|
||||
|
||||
private void handleTap()
|
||||
|
@ -25,6 +25,10 @@ namespace osu.Game.Screens.Edit.Timing
|
||||
[Resolved]
|
||||
private Bindable<ControlPointGroup> selectedGroup { get; set; }
|
||||
|
||||
private readonly BindableBool isHandlingTapping = new BindableBool();
|
||||
|
||||
private MetronomeDisplay metronome;
|
||||
|
||||
[BackgroundDependencyLoader]
|
||||
private void load(OverlayColourProvider colourProvider, OsuColour colours)
|
||||
{
|
||||
@ -73,7 +77,7 @@ namespace osu.Game.Screens.Edit.Timing
|
||||
{
|
||||
new Drawable[]
|
||||
{
|
||||
new MetronomeDisplay
|
||||
metronome = new MetronomeDisplay
|
||||
{
|
||||
Anchor = Anchor.CentreLeft,
|
||||
Origin = Anchor.CentreLeft,
|
||||
@ -149,11 +153,17 @@ namespace osu.Game.Screens.Edit.Timing
|
||||
{
|
||||
Anchor = Anchor.Centre,
|
||||
Origin = Anchor.Centre,
|
||||
IsHandlingTapping = { BindTarget = isHandlingTapping }
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
};
|
||||
|
||||
isHandlingTapping.BindValueChanged(handling =>
|
||||
{
|
||||
metronome.EnableClicking = !handling.NewValue;
|
||||
}, true);
|
||||
}
|
||||
|
||||
private void adjustOffset(double adjust)
|
||||
|
Loading…
Reference in New Issue
Block a user