1
0
mirror of https://github.com/ppy/osu.git synced 2024-12-14 16:52:54 +08:00

Use mid time instead of start time

It is closer to the old blueprint-based behavior
This commit is contained in:
ekrctb 2022-10-05 22:19:22 +09:00
parent 6753f6b01a
commit b0213c29e9

View File

@ -185,7 +185,11 @@ namespace osu.Game.Screens.Edit.Compose.Components.Timeline
SelectedItems.RemoveAll(hitObject => !shouldBeSelected(hitObject));
SelectedItems.AddRange(Beatmap.HitObjects.Except(SelectedItems).Where(shouldBeSelected));
bool shouldBeSelected(HitObject hitObject) => minTime <= hitObject.StartTime && hitObject.StartTime <= maxTime;
bool shouldBeSelected(HitObject hitObject)
{
double midTime = (hitObject.StartTime + hitObject.GetEndTime()) / 2;
return minTime <= midTime && midTime <= maxTime;
}
}
private void handleScrollViaDrag(DragEvent e)