From 9dc07909b257c5d6f6678e3282f757433d3d59ca Mon Sep 17 00:00:00 2001 From: andy840119 Date: Sat, 13 Jul 2024 20:09:10 +0800 Subject: [PATCH 1/2] Fix the blueprint tag selection issue. --- .../Components/Lyrics/Blueprints/RubyTagSelectionBlueprint.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/osu.Game.Rulesets.Karaoke/Screens/Edit/Beatmaps/Lyrics/Content/Components/Lyrics/Blueprints/RubyTagSelectionBlueprint.cs b/osu.Game.Rulesets.Karaoke/Screens/Edit/Beatmaps/Lyrics/Content/Components/Lyrics/Blueprints/RubyTagSelectionBlueprint.cs index 258da1f26..182f10201 100644 --- a/osu.Game.Rulesets.Karaoke/Screens/Edit/Beatmaps/Lyrics/Content/Components/Lyrics/Blueprints/RubyTagSelectionBlueprint.cs +++ b/osu.Game.Rulesets.Karaoke/Screens/Edit/Beatmaps/Lyrics/Content/Components/Lyrics/Blueprints/RubyTagSelectionBlueprint.cs @@ -126,7 +126,7 @@ static void updateDrawableRect(Drawable target, RectangleF rect) public override bool ReceivePositionalInputAt(Vector2 screenSpacePos) => previewTextArea.ReceivePositionalInputAt(screenSpacePos); - public override Vector2 ScreenSpaceSelectionPoint => ScreenSpaceDrawQuad.TopLeft; + public override Vector2 ScreenSpaceSelectionPoint => previewTextArea.ScreenSpaceDrawQuad.Centre; public override Quad SelectionQuad => previewTextArea.ScreenSpaceDrawQuad; From b7c3ec4bd6bd1e3228943585ada2f06aed132023 Mon Sep 17 00:00:00 2001 From: andy840119 Date: Sat, 13 Jul 2024 20:09:21 +0800 Subject: [PATCH 2/2] Selection should be sorted. --- .../Components/Lyrics/Blueprints/RubyBlueprintContainer.cs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/osu.Game.Rulesets.Karaoke/Screens/Edit/Beatmaps/Lyrics/Content/Components/Lyrics/Blueprints/RubyBlueprintContainer.cs b/osu.Game.Rulesets.Karaoke/Screens/Edit/Beatmaps/Lyrics/Content/Components/Lyrics/Blueprints/RubyBlueprintContainer.cs index 9035a37c9..909589bb9 100644 --- a/osu.Game.Rulesets.Karaoke/Screens/Edit/Beatmaps/Lyrics/Content/Components/Lyrics/Blueprints/RubyBlueprintContainer.cs +++ b/osu.Game.Rulesets.Karaoke/Screens/Edit/Beatmaps/Lyrics/Content/Components/Lyrics/Blueprints/RubyBlueprintContainer.cs @@ -34,6 +34,9 @@ protected override SelectionHandler CreateSelectionHandler() protected override SelectionBlueprint CreateBlueprintFor(RubyTag item) => new RubyTagSelectionBlueprint(item); + protected override IEnumerable> SortForMovement(IReadOnlyList> blueprints) + => blueprints.OrderBy(b => b.Item.StartIndex); + protected partial class RubyTagSelectionHandler : LyricPropertySelectionHandler { [Resolved]