From 7335c51165bbe6f7876d08f1ada489116e20d141 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=82=BA=E4=BB=80=E9=BA=BC?= Date: Thu, 7 Jul 2022 22:02:02 +0800 Subject: [PATCH] Because masking container has render issue in some graphic cards, so using container with masking effect instead. --- .../Graphics/Sprites/KaraokeSpriteText.cs | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/osu.Framework.Font/Graphics/Sprites/KaraokeSpriteText.cs b/osu.Framework.Font/Graphics/Sprites/KaraokeSpriteText.cs index 7fa33a6..e76ff1f 100644 --- a/osu.Framework.Font/Graphics/Sprites/KaraokeSpriteText.cs +++ b/osu.Framework.Font/Graphics/Sprites/KaraokeSpriteText.cs @@ -22,10 +22,10 @@ public class KaraokeSpriteText : KaraokeSpriteText { internal const double INTERPOLATION_TIMING = 1; - private readonly MaskingContainer leftLyricTextContainer; + private readonly Container leftLyricTextContainer; private readonly T leftLyricText; - private readonly MaskingContainer rightLyricTextContainer; + private readonly Container rightLyricTextContainer; private readonly T rightLyricText; // todo: should have a better way to let user able to customize formats? @@ -39,22 +39,22 @@ public KaraokeSpriteText() AutoSizeAxes = Axes.Both; InternalChildren = new Drawable[] { - rightLyricTextContainer = new MaskingContainer + rightLyricTextContainer = new Container { AutoSizeAxes = Axes.Y, Anchor = Anchor.CentreRight, Origin = Anchor.CentreRight, - MaskingEdges = Edges.Left, + Masking = true, Child = rightLyricText = new T { Anchor = Anchor.CentreRight, Origin = Anchor.CentreRight, } }, - leftLyricTextContainer = new MaskingContainer + leftLyricTextContainer = new Container { AutoSizeAxes = Axes.Y, - MaskingEdges = Edges.Right, + Masking = true, Child = leftLyricText = new T(), } };