From d300aacc06b9ec790686b29f8301771984ed4225 Mon Sep 17 00:00:00 2001 From: andy840119 Date: Tue, 5 Sep 2023 21:23:22 +0800 Subject: [PATCH 1/3] Rename the drawable caret. --- .../Edit/Beatmaps/Lyrics/Components/Lyrics/CaretLayer.cs | 2 +- ...eRubyTagCaretPosition.cs => DrawableCreateRubyTagCaret.cs} | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) rename osu.Game.Rulesets.Karaoke/Screens/Edit/Beatmaps/Lyrics/Components/Lyrics/Carets/{DrawableCreateRubyTagCaretPosition.cs => DrawableCreateRubyTagCaret.cs} (95%) diff --git a/osu.Game.Rulesets.Karaoke/Screens/Edit/Beatmaps/Lyrics/Components/Lyrics/CaretLayer.cs b/osu.Game.Rulesets.Karaoke/Screens/Edit/Beatmaps/Lyrics/Components/Lyrics/CaretLayer.cs index fc423fab5..1c8655b6a 100644 --- a/osu.Game.Rulesets.Karaoke/Screens/Edit/Beatmaps/Lyrics/Components/Lyrics/CaretLayer.cs +++ b/osu.Game.Rulesets.Karaoke/Screens/Edit/Beatmaps/Lyrics/Components/Lyrics/CaretLayer.cs @@ -80,7 +80,7 @@ private void updateDrawableCaret(ICaretPosition? position, DrawableCaretType typ // typing TypingCaretPosition => new DrawableTypingCaret(type), // creat ruby-tag - CreateRubyTagCaretPosition => new DrawableCreateRubyTagCaretPosition(type), + CreateRubyTagCaretPosition => new DrawableCreateRubyTagCaret(type), // creat time-tag TimeTagIndexCaretPosition => new DrawableTimeTagIndexCaret(type), // record time-tag diff --git a/osu.Game.Rulesets.Karaoke/Screens/Edit/Beatmaps/Lyrics/Components/Lyrics/Carets/DrawableCreateRubyTagCaretPosition.cs b/osu.Game.Rulesets.Karaoke/Screens/Edit/Beatmaps/Lyrics/Components/Lyrics/Carets/DrawableCreateRubyTagCaret.cs similarity index 95% rename from osu.Game.Rulesets.Karaoke/Screens/Edit/Beatmaps/Lyrics/Components/Lyrics/Carets/DrawableCreateRubyTagCaretPosition.cs rename to osu.Game.Rulesets.Karaoke/Screens/Edit/Beatmaps/Lyrics/Components/Lyrics/Carets/DrawableCreateRubyTagCaret.cs index 68f68bbf7..65b6aa3e2 100644 --- a/osu.Game.Rulesets.Karaoke/Screens/Edit/Beatmaps/Lyrics/Components/Lyrics/Carets/DrawableCreateRubyTagCaretPosition.cs +++ b/osu.Game.Rulesets.Karaoke/Screens/Edit/Beatmaps/Lyrics/Components/Lyrics/Carets/DrawableCreateRubyTagCaret.cs @@ -18,7 +18,7 @@ namespace osu.Game.Rulesets.Karaoke.Screens.Edit.Beatmaps.Lyrics.Components.Lyrics.Carets; -public partial class DrawableCreateRubyTagCaretPosition : DrawableRangeCaret +public partial class DrawableCreateRubyTagCaret : DrawableRangeCaret { private const float border_spacing = 5; private const float caret_move_time = 60; @@ -32,7 +32,7 @@ public partial class DrawableCreateRubyTagCaretPosition : DrawableRangeCaret Date: Tue, 5 Sep 2023 21:32:18 +0800 Subject: [PATCH 2/3] Remove the damn logger. --- .../Components/Lyrics/Carets/DrawableCreateRubyTagCaret.cs | 3 --- 1 file changed, 3 deletions(-) diff --git a/osu.Game.Rulesets.Karaoke/Screens/Edit/Beatmaps/Lyrics/Components/Lyrics/Carets/DrawableCreateRubyTagCaret.cs b/osu.Game.Rulesets.Karaoke/Screens/Edit/Beatmaps/Lyrics/Components/Lyrics/Carets/DrawableCreateRubyTagCaret.cs index 65b6aa3e2..6e76ba1e5 100644 --- a/osu.Game.Rulesets.Karaoke/Screens/Edit/Beatmaps/Lyrics/Components/Lyrics/Carets/DrawableCreateRubyTagCaret.cs +++ b/osu.Game.Rulesets.Karaoke/Screens/Edit/Beatmaps/Lyrics/Components/Lyrics/Carets/DrawableCreateRubyTagCaret.cs @@ -7,7 +7,6 @@ using osu.Framework.Graphics.Primitives; using osu.Framework.Graphics.Shapes; using osu.Framework.Graphics.Sprites; -using osu.Framework.Logging; using osu.Game.Graphics; using osu.Game.Graphics.UserInterface; using osu.Game.Rulesets.Karaoke.Edit.ChangeHandlers.Lyrics; @@ -97,8 +96,6 @@ protected override void ApplyRangeCaretPosition(RangeCaretPosition Date: Tue, 5 Sep 2023 21:37:59 +0800 Subject: [PATCH 3/3] Use verbatim string. --- .../IO/Serialization/Converters/RomajiTagConverter.cs | 2 +- .../IO/Serialization/Converters/RubyTagConverter.cs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/osu.Game.Rulesets.Karaoke/IO/Serialization/Converters/RomajiTagConverter.cs b/osu.Game.Rulesets.Karaoke/IO/Serialization/Converters/RomajiTagConverter.cs index ddbff740f..508d16f3a 100644 --- a/osu.Game.Rulesets.Karaoke/IO/Serialization/Converters/RomajiTagConverter.cs +++ b/osu.Game.Rulesets.Karaoke/IO/Serialization/Converters/RomajiTagConverter.cs @@ -20,7 +20,7 @@ public override RomajiTag ReadJson(JsonReader reader, Type objectType, RomajiTag if (string.IsNullOrEmpty(value)) return new RomajiTag(); - var regex = new Regex("\\[(?[-0-9]+)(?:,(?[-0-9]+))?\\]:(?.*$)"); + var regex = new Regex(@"\[(?[-0-9]+)(?:,(?[-0-9]+))?\]:(?.*$)"); var result = regex.Match(value); if (!result.Success) return new RomajiTag(); diff --git a/osu.Game.Rulesets.Karaoke/IO/Serialization/Converters/RubyTagConverter.cs b/osu.Game.Rulesets.Karaoke/IO/Serialization/Converters/RubyTagConverter.cs index 69fc0ec20..5d8f98606 100644 --- a/osu.Game.Rulesets.Karaoke/IO/Serialization/Converters/RubyTagConverter.cs +++ b/osu.Game.Rulesets.Karaoke/IO/Serialization/Converters/RubyTagConverter.cs @@ -20,7 +20,7 @@ public override RubyTag ReadJson(JsonReader reader, Type objectType, RubyTag? ex if (string.IsNullOrEmpty(value)) return new RubyTag(); - var regex = new Regex("\\[(?[-0-9]+)(?:,(?[-0-9]+))?\\]:(?.*$)"); + var regex = new Regex(@"\[(?[-0-9]+)(?:,(?[-0-9]+))?\]:(?.*$)"); var result = regex.Match(value); if (!result.Success) return new RubyTag();