1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-12 19:42:55 +08:00

Force glowing sprite text to never redraw

This commit is contained in:
smoogipoo 2019-09-05 14:41:02 +09:00
parent 2e6af84ca8
commit 99579255ad

View File

@ -12,7 +12,6 @@ namespace osu.Game.Graphics.Sprites
public class GlowingSpriteText : Container, IHasText public class GlowingSpriteText : Container, IHasText
{ {
private readonly OsuSpriteText spriteText, blurredText; private readonly OsuSpriteText spriteText, blurredText;
private readonly BufferedContainer buffer;
public string Text public string Text
{ {
@ -44,24 +43,19 @@ namespace osu.Game.Graphics.Sprites
set => blurredText.Colour = value; set => blurredText.Colour = value;
} }
public bool RedrawOnScale
{
get => buffer.RedrawOnScale;
set => buffer.RedrawOnScale = value;
}
public GlowingSpriteText() public GlowingSpriteText()
{ {
AutoSizeAxes = Axes.Both; AutoSizeAxes = Axes.Both;
Children = new Drawable[] Children = new Drawable[]
{ {
buffer = new BufferedContainer new BufferedContainer
{ {
Anchor = Anchor.Centre, Anchor = Anchor.Centre,
Origin = Anchor.Centre, Origin = Anchor.Centre,
BlurSigma = new Vector2(4), BlurSigma = new Vector2(4),
CacheDrawnFrameBuffer = true, CacheDrawnFrameBuffer = true,
RedrawOnScale = false,
RelativeSizeAxes = Axes.Both, RelativeSizeAxes = Axes.Both,
Blending = BlendingParameters.Additive, Blending = BlendingParameters.Additive,
Size = new Vector2(3f), Size = new Vector2(3f),