From ef6667ffe550bb8df93a95df0eb8efe111a7bdf4 Mon Sep 17 00:00:00 2001 From: andy840119 Date: Sat, 21 May 2022 11:56:26 +0800 Subject: [PATCH] Should render the ruby/romaji character into screen. --- .../Graphics/Sprites/LyricSpriteText_Characters.cs | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/osu.Framework.Font/Graphics/Sprites/LyricSpriteText_Characters.cs b/osu.Framework.Font/Graphics/Sprites/LyricSpriteText_Characters.cs index 611fe0b..d0f9240 100644 --- a/osu.Framework.Font/Graphics/Sprites/LyricSpriteText_Characters.cs +++ b/osu.Framework.Font/Graphics/Sprites/LyricSpriteText_Characters.cs @@ -343,6 +343,20 @@ private void computeScreenSpaceCharacters() }); } + var positionCharacters = new List() + .Concat(rubyCharacters.SelectMany(x => x.Value)) + .Concat(romajiCharacters.SelectMany(x => x.Value)); + + foreach (var character in positionCharacters) + { + screenSpaceCharactersBacking.Add(new ScreenSpaceCharacterPart + { + DrawQuad = ToScreenSpace(character.DrawRectangle.Inflate(inflationAmount)), + InflationPercentage = Vector2.Divide(inflationAmount, character.DrawRectangle.Size), + Texture = character.Texture + }); + } + localScreenSpaceCache.Validate(); }