mirror of
https://github.com/ppy/osu.git
synced 2025-03-14 05:07:26 +08:00
Expose whether an EditorBeatmap
has timing present or not via bindable
This commit is contained in:
parent
7a671754f2
commit
3ae5f6707a
@ -46,12 +46,22 @@ namespace osu.Game.Screens.Edit
|
||||
|
||||
public readonly IBeatmap PlayableBeatmap;
|
||||
|
||||
/// <summary>
|
||||
/// Whether at least one timing control point is present and providing timing information.
|
||||
/// </summary>
|
||||
public IBindable<bool> HasTiming => hasTiming;
|
||||
|
||||
private readonly Bindable<bool> hasTiming = new Bindable<bool>();
|
||||
|
||||
[CanBeNull]
|
||||
public readonly ISkin BeatmapSkin;
|
||||
|
||||
[Resolved]
|
||||
private BindableBeatDivisor beatDivisor { get; set; }
|
||||
|
||||
[Resolved]
|
||||
private EditorClock editorClock { get; set; }
|
||||
|
||||
private readonly IBeatmapProcessor beatmapProcessor;
|
||||
|
||||
private readonly Dictionary<HitObject, Bindable<double>> startTimeBindables = new Dictionary<HitObject, Bindable<double>>();
|
||||
@ -238,6 +248,8 @@ namespace osu.Game.Screens.Edit
|
||||
|
||||
if (batchPendingUpdates.Count > 0)
|
||||
UpdateState();
|
||||
|
||||
hasTiming.Value = !ReferenceEquals(ControlPointInfo.TimingPointAt(editorClock.CurrentTime), TimingControlPoint.DEFAULT);
|
||||
}
|
||||
|
||||
protected override void UpdateState()
|
||||
|
Loading…
x
Reference in New Issue
Block a user