1
0
mirror of https://github.com/ppy/osu.git synced 2025-03-23 01:37:31 +08:00

Merge branch 'master' into fix-editor-samples-not-pausing-screen-swap

This commit is contained in:
Dan Balasescu 2020-10-27 21:29:16 +09:00 committed by GitHub
commit 26a7545534
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 12 additions and 17 deletions

View File

@ -197,9 +197,11 @@ namespace osu.Game.Rulesets.UI
manualClock.Rate = Math.Abs(parentGameplayClock.Rate) * direction;
manualClock.IsRunning = parentGameplayClock.IsRunning;
requireMoreUpdateLoops |= manualClock.CurrentTime != parentGameplayClock.CurrentTime;
double timeBehind = Math.Abs(manualClock.CurrentTime - parentGameplayClock.CurrentTime);
frameStableClock.IsCatchingUp.Value = requireMoreUpdateLoops;
requireMoreUpdateLoops |= timeBehind != 0;
frameStableClock.IsCatchingUp.Value = timeBehind > 200;
// The manual clock time has changed in the above code. The framed clock now needs to be updated
// to ensure that the its time is valid for our children before input is processed

View File

@ -177,6 +177,9 @@ namespace osu.Game.Screens.Edit.Timing
private readonly Box hoveredBackground;
[Resolved]
private EditorClock clock { get; set; }
[Resolved]
private Bindable<ControlPointGroup> selectedGroup { get; set; }
@ -200,7 +203,11 @@ namespace osu.Game.Screens.Edit.Timing
},
};
Action = () => selectedGroup.Value = controlGroup;
Action = () =>
{
selectedGroup.Value = controlGroup;
clock.SeekTo(controlGroup.Time);
};
}
private Color4 colourHover;

View File

@ -22,9 +22,6 @@ namespace osu.Game.Screens.Edit.Timing
[Cached]
private Bindable<ControlPointGroup> selectedGroup = new Bindable<ControlPointGroup>();
[Resolved]
private EditorClock clock { get; set; }
public TimingScreen()
: base(EditorScreenMode.Timing)
{
@ -48,17 +45,6 @@ namespace osu.Game.Screens.Edit.Timing
}
};
protected override void LoadComplete()
{
base.LoadComplete();
selectedGroup.BindValueChanged(selected =>
{
if (selected.NewValue != null)
clock.SeekTo(selected.NewValue.Time);
});
}
protected override void OnTimelineLoaded(TimelineArea timelineArea)
{
base.OnTimelineLoaded(timelineArea);