1
0
mirror of https://github.com/ppy/osu.git synced 2025-02-08 07:02:54 +08:00

Move ApplySelectionOrder override from EditorBlueprintContainer to ComposeBlueprintContainer

This commit is contained in:
Marvin Helstein 2025-01-30 10:15:16 +02:00
parent 48b1c7398e
commit ec99fc1141
2 changed files with 5 additions and 5 deletions

View File

@ -3,6 +3,7 @@
#nullable disable
using System;
using System.Collections.Generic;
using System.Linq;
using Humanizer;
@ -52,6 +53,10 @@ namespace osu.Game.Screens.Edit.Compose.Components
/// </remarks>
public override bool ReceivePositionalInputAt(Vector2 screenSpacePos) => editorScreen?.MainContent.ReceivePositionalInputAt(screenSpacePos) ?? base.ReceivePositionalInputAt(screenSpacePos);
protected override IEnumerable<SelectionBlueprint<HitObject>> ApplySelectionOrder(IEnumerable<SelectionBlueprint<HitObject>> blueprints) =>
base.ApplySelectionOrder(blueprints)
.OrderBy(b => Math.Min(Math.Abs(EditorClock.CurrentTime - b.Item.GetEndTime()), Math.Abs(EditorClock.CurrentTime - b.Item.StartTime)));
protected ComposeBlueprintContainer(HitObjectComposer composer)
: base(composer)
{

View File

@ -3,7 +3,6 @@
#nullable disable
using System;
using System.Collections.Generic;
using System.Collections.Specialized;
using System.Linq;
@ -126,10 +125,6 @@ namespace osu.Game.Screens.Edit.Compose.Components
return true;
}
protected override IEnumerable<SelectionBlueprint<HitObject>> ApplySelectionOrder(IEnumerable<SelectionBlueprint<HitObject>> blueprints) =>
base.ApplySelectionOrder(blueprints)
.OrderBy(b => Math.Min(Math.Abs(EditorClock.CurrentTime - b.Item.GetEndTime()), Math.Abs(EditorClock.CurrentTime - b.Item.StartTime)));
protected override SelectionBlueprintContainer CreateSelectionBlueprintContainer() => new HitObjectOrderedSelectionContainer { RelativeSizeAxes = Axes.Both };
protected override SelectionHandler<HitObject> CreateSelectionHandler() => new EditorSelectionHandler();