mirror of
https://github.com/ppy/osu.git
synced 2025-02-22 03:43:01 +08:00
Update editor time when a new timing point is selected
This commit is contained in:
parent
25601ac17c
commit
81e8b678d3
@ -2,11 +2,13 @@
|
|||||||
// See the LICENCE file in the repository root for full licence text.
|
// See the LICENCE file in the repository root for full licence text.
|
||||||
|
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
using osu.Framework.Allocation;
|
using osu.Framework.Allocation;
|
||||||
using osu.Framework.Bindables;
|
using osu.Framework.Bindables;
|
||||||
using osu.Framework.Graphics;
|
using osu.Framework.Graphics;
|
||||||
using osu.Framework.Graphics.Containers;
|
using osu.Framework.Graphics.Containers;
|
||||||
using osu.Framework.Graphics.Shapes;
|
using osu.Framework.Graphics.Shapes;
|
||||||
|
using osu.Framework.Timing;
|
||||||
using osu.Game.Beatmaps;
|
using osu.Game.Beatmaps;
|
||||||
using osu.Game.Beatmaps.ControlPoints;
|
using osu.Game.Beatmaps.ControlPoints;
|
||||||
using osu.Game.Graphics;
|
using osu.Game.Graphics;
|
||||||
@ -19,6 +21,9 @@ namespace osu.Game.Screens.Edit.Timing
|
|||||||
[Cached]
|
[Cached]
|
||||||
private Bindable<IEnumerable<ControlPoint>> selectedPoints = new Bindable<IEnumerable<ControlPoint>>();
|
private Bindable<IEnumerable<ControlPoint>> selectedPoints = new Bindable<IEnumerable<ControlPoint>>();
|
||||||
|
|
||||||
|
[Resolved]
|
||||||
|
private IAdjustableClock clock { get; set; }
|
||||||
|
|
||||||
protected override Drawable CreateMainContent() => new GridContainer
|
protected override Drawable CreateMainContent() => new GridContainer
|
||||||
{
|
{
|
||||||
RelativeSizeAxes = Axes.Both,
|
RelativeSizeAxes = Axes.Both,
|
||||||
@ -37,6 +42,13 @@ namespace osu.Game.Screens.Edit.Timing
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
protected override void LoadComplete()
|
||||||
|
{
|
||||||
|
base.LoadComplete();
|
||||||
|
|
||||||
|
selectedPoints.BindValueChanged(selected => { clock.Seek(selected.NewValue.First().Time); });
|
||||||
|
}
|
||||||
|
|
||||||
public class ControlPointList : CompositeDrawable
|
public class ControlPointList : CompositeDrawable
|
||||||
{
|
{
|
||||||
[Resolved]
|
[Resolved]
|
||||||
|
Loading…
Reference in New Issue
Block a user