1
0
mirror of https://github.com/ppy/osu.git synced 2024-12-21 15:33:22 +08:00
osu-lazer/osu.Game/Screens/Edit/Compose/Components/Timeline/TimingPointPiece.cs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

32 lines
875 B
C#
Raw Normal View History

// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
2022-06-17 15:37:17 +08:00
#nullable disable
using osu.Framework.Allocation;
using osu.Framework.Bindables;
using osu.Game.Beatmaps.ControlPoints;
namespace osu.Game.Screens.Edit.Compose.Components.Timeline
{
public class TimingPointPiece : TopPointPiece
{
private readonly BindableNumber<double> beatLength;
public TimingPointPiece(TimingControlPoint point)
: base(point)
{
beatLength = point.BeatLengthBindable.GetBoundCopy();
}
[BackgroundDependencyLoader]
2022-01-15 08:06:39 +08:00
private void load()
{
beatLength.BindValueChanged(beatLength =>
{
Label.Text = $"{60000 / beatLength.NewValue:n1} BPM";
}, true);
}
}
}