mirror of
https://github.com/ppy/osu
synced 2024-12-24 15:53:37 +00:00
Don't redraw leaderboard scores
This commit is contained in:
parent
a87a1e6031
commit
2e6af84ca8
@ -12,6 +12,7 @@ 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
|
||||||
{
|
{
|
||||||
@ -43,13 +44,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[]
|
||||||
{
|
{
|
||||||
new BufferedContainer
|
buffer = new BufferedContainer
|
||||||
{
|
{
|
||||||
Anchor = Anchor.Centre,
|
Anchor = Anchor.Centre,
|
||||||
Origin = Anchor.Centre,
|
Origin = Anchor.Centre,
|
||||||
|
@ -193,6 +193,7 @@ namespace osu.Game.Online.Leaderboards
|
|||||||
GlowColour = OsuColour.FromHex(@"83ccfa"),
|
GlowColour = OsuColour.FromHex(@"83ccfa"),
|
||||||
Text = score.TotalScore.ToString(@"N0"),
|
Text = score.TotalScore.ToString(@"N0"),
|
||||||
Font = OsuFont.Numeric.With(size: 23),
|
Font = OsuFont.Numeric.With(size: 23),
|
||||||
|
RedrawOnScale = false,
|
||||||
},
|
},
|
||||||
RankContainer = new Container
|
RankContainer = new Container
|
||||||
{
|
{
|
||||||
@ -338,6 +339,7 @@ namespace osu.Game.Online.Leaderboards
|
|||||||
GlowColour = OsuColour.FromHex(@"83ccfa"),
|
GlowColour = OsuColour.FromHex(@"83ccfa"),
|
||||||
Text = statistic.Value,
|
Text = statistic.Value,
|
||||||
Font = OsuFont.GetFont(size: 17, weight: FontWeight.Bold),
|
Font = OsuFont.GetFont(size: 17, weight: FontWeight.Bold),
|
||||||
|
RedrawOnScale = false
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user