mirror of
https://github.com/ppy/osu
synced 2024-12-15 19:36:34 +00:00
Use mid time instead of start time
It is closer to the old blueprint-based behavior
This commit is contained in:
parent
6753f6b01a
commit
b0213c29e9
@ -185,7 +185,11 @@ namespace osu.Game.Screens.Edit.Compose.Components.Timeline
|
|||||||
SelectedItems.RemoveAll(hitObject => !shouldBeSelected(hitObject));
|
SelectedItems.RemoveAll(hitObject => !shouldBeSelected(hitObject));
|
||||||
SelectedItems.AddRange(Beatmap.HitObjects.Except(SelectedItems).Where(shouldBeSelected));
|
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)
|
private void handleScrollViaDrag(DragEvent e)
|
||||||
|
Loading…
Reference in New Issue
Block a user