From 8c86ea902b20cd0fcd86da166c38698f1f0841e8 Mon Sep 17 00:00:00 2001 From: andy840119 Date: Wed, 20 Apr 2022 21:25:59 +0800 Subject: [PATCH 1/3] Use hit state transforms instead. Because the lyric will fade out after end time. --- .../Objects/Drawables/DrawableLyric.cs | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/osu.Game.Rulesets.Karaoke/Objects/Drawables/DrawableLyric.cs b/osu.Game.Rulesets.Karaoke/Objects/Drawables/DrawableLyric.cs index 31cea3c8f..5b98d7669 100644 --- a/osu.Game.Rulesets.Karaoke/Objects/Drawables/DrawableLyric.cs +++ b/osu.Game.Rulesets.Karaoke/Objects/Drawables/DrawableLyric.cs @@ -15,6 +15,7 @@ using osu.Game.Rulesets.Karaoke.Scoring; using osu.Game.Rulesets.Karaoke.Skinning.Default; using osu.Game.Rulesets.Karaoke.Skinning.Elements; +using osu.Game.Rulesets.Objects.Drawables; using osu.Game.Skinning; using osuTK; @@ -220,15 +221,12 @@ protected override void CheckForResult(bool userTriggered, double timeOffset) } } - protected override void UpdateStartTimeStateTransforms() + protected override void UpdateHitStateTransforms(ArmedState state) { - base.UpdateStartTimeStateTransforms(); + base.UpdateHitStateTransforms(state); - using (BeginDelayedSequence(HitObject.Duration)) - { - const float fade_out_time = 500; - this.FadeOut(fade_out_time); - } + const float fade_out_time = 500; + this.FadeOut(fade_out_time); } public void ApplyToLyricPieces(Action action) From bf17ced6fded0f09291b2b8d90a85cca5df8c054 Mon Sep 17 00:00:00 2001 From: andy840119 Date: Wed, 20 Apr 2022 23:39:08 +0800 Subject: [PATCH 2/3] Update update the font package, karaoke font will clear the transform after finish all the transformer. So we should prevent the transform clear in the lyric editor. --- .../Edit/Lyrics/Rows/Components/EditorLyricPiece.cs | 2 ++ osu.Game.Rulesets.Karaoke/osu.Game.Rulesets.Karaoke.csproj | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/osu.Game.Rulesets.Karaoke/Edit/Lyrics/Rows/Components/EditorLyricPiece.cs b/osu.Game.Rulesets.Karaoke/Edit/Lyrics/Rows/Components/EditorLyricPiece.cs index 5501347b2..e0335e11d 100644 --- a/osu.Game.Rulesets.Karaoke/Edit/Lyrics/Rows/Components/EditorLyricPiece.cs +++ b/osu.Game.Rulesets.Karaoke/Edit/Lyrics/Rows/Components/EditorLyricPiece.cs @@ -160,6 +160,8 @@ static FontUsage getFont(float? charSize = null) }, true); } + public override bool RemoveCompletedTransforms => false; + public class EditorLyricSpriteText : LyricSpriteText { public RectangleF GetRubyTagPosition(RubyTag rubyTag) diff --git a/osu.Game.Rulesets.Karaoke/osu.Game.Rulesets.Karaoke.csproj b/osu.Game.Rulesets.Karaoke/osu.Game.Rulesets.Karaoke.csproj index d76249eae..32fb833de 100644 --- a/osu.Game.Rulesets.Karaoke/osu.Game.Rulesets.Karaoke.csproj +++ b/osu.Game.Rulesets.Karaoke/osu.Game.Rulesets.Karaoke.csproj @@ -10,7 +10,7 @@ - + From 49eaf213c8b72d9f345dad5fb5ac33228782be8b Mon Sep 17 00:00:00 2001 From: andy840119 Date: Fri, 22 Apr 2022 22:55:53 +0800 Subject: [PATCH 3/3] Update the package to fix the playback issue. Also, should initial the transform after drawable hit object loaded. --- .../Objects/Drawables/DrawableLyric.cs | 7 +++++++ osu.Game.Rulesets.Karaoke/osu.Game.Rulesets.Karaoke.csproj | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/osu.Game.Rulesets.Karaoke/Objects/Drawables/DrawableLyric.cs b/osu.Game.Rulesets.Karaoke/Objects/Drawables/DrawableLyric.cs index 5b98d7669..042575be6 100644 --- a/osu.Game.Rulesets.Karaoke/Objects/Drawables/DrawableLyric.cs +++ b/osu.Game.Rulesets.Karaoke/Objects/Drawables/DrawableLyric.cs @@ -221,6 +221,13 @@ protected override void CheckForResult(bool userTriggered, double timeOffset) } } + protected override void UpdateInitialTransforms() + { + base.UpdateInitialTransforms(); + + lyricPieces.ForEach(x => x.RefreshStateTransforms()); + } + protected override void UpdateHitStateTransforms(ArmedState state) { base.UpdateHitStateTransforms(state); diff --git a/osu.Game.Rulesets.Karaoke/osu.Game.Rulesets.Karaoke.csproj b/osu.Game.Rulesets.Karaoke/osu.Game.Rulesets.Karaoke.csproj index 32fb833de..fd11a5356 100644 --- a/osu.Game.Rulesets.Karaoke/osu.Game.Rulesets.Karaoke.csproj +++ b/osu.Game.Rulesets.Karaoke/osu.Game.Rulesets.Karaoke.csproj @@ -10,7 +10,7 @@ - +