1
0
mirror of https://github.com/ppy/osu.git synced 2025-02-15 11:52:56 +08:00

Merge branch 'master' into spectator-connection-logging

This commit is contained in:
Bartłomiej Dach 2020-11-02 20:21:45 +01:00 committed by GitHub
commit b152514bc7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 11 additions and 4 deletions

View File

@ -419,11 +419,11 @@ namespace osu.Game.Screens.Edit.Compose.Components
};
// bring in updates from selection changes
EditorBeatmap.HitObjectUpdated += _ => UpdateTernaryStates();
EditorBeatmap.HitObjectUpdated += _ => Scheduler.AddOnce(UpdateTernaryStates);
EditorBeatmap.SelectedHitObjects.CollectionChanged += (sender, args) =>
{
Scheduler.AddOnce(updateVisibility);
UpdateTernaryStates();
Scheduler.AddOnce(UpdateTernaryStates);
};
}

View File

@ -266,8 +266,15 @@ namespace osu.Game.Screens.Edit
{
public override string TargetMember => nameof(currentTime);
protected override void Apply(EditorClock clock, double time) =>
clock.currentTime = Interpolation.ValueAt(time, StartValue, EndValue, StartTime, EndTime, Easing);
protected override void Apply(EditorClock clock, double time) => clock.currentTime = valueAt(time);
private double valueAt(double time)
{
if (time < StartTime) return StartValue;
if (time >= EndTime) return EndValue;
return Interpolation.ValueAt(time, StartValue, EndValue, StartTime, EndTime, Easing);
}
protected override void ReadIntoStartValue(EditorClock clock) => StartValue = clock.currentTime;
}