mirror of
https://github.com/ppy/osu.git
synced 2024-09-22 03:27:24 +08:00
Add setting to toggle metronome in "Target" mod
As mentioned in https://github.com/ppy/osu/discussions/20006#discussioncomment-3496732.
This commit is contained in:
parent
2b7b77157a
commit
780121eeee
@ -59,6 +59,9 @@ namespace osu.Game.Rulesets.Osu.Mods
|
|||||||
Value = null
|
Value = null
|
||||||
};
|
};
|
||||||
|
|
||||||
|
[SettingSource("Metronome ticks", "Whether a metronome beat should play in the background")]
|
||||||
|
public BindableBool Metronome { get; } = new BindableBool(true);
|
||||||
|
|
||||||
#region Constants
|
#region Constants
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@ -337,7 +340,8 @@ namespace osu.Game.Rulesets.Osu.Mods
|
|||||||
|
|
||||||
public void ApplyToDrawableRuleset(DrawableRuleset<OsuHitObject> drawableRuleset)
|
public void ApplyToDrawableRuleset(DrawableRuleset<OsuHitObject> drawableRuleset)
|
||||||
{
|
{
|
||||||
drawableRuleset.Overlays.Add(new MetronomeBeat(drawableRuleset.Beatmap.HitObjects.First().StartTime));
|
if (Metronome.Value)
|
||||||
|
drawableRuleset.Overlays.Add(new MetronomeBeat(drawableRuleset.Beatmap.HitObjects.First().StartTime));
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
Loading…
Reference in New Issue
Block a user