mirror of
https://github.com/osukey/osukey.git
synced 2025-06-05 21:07:18 +09:00
Rewrite ScoreComponentLabel.
This commit is contained in:
parent
68910745d8
commit
db4c26e1ab
@ -142,6 +142,8 @@ namespace osu.Game.Screens.Select.Leaderboards
|
|||||||
{
|
{
|
||||||
flagBadgeContainer = new Container
|
flagBadgeContainer = new Container
|
||||||
{
|
{
|
||||||
|
Origin = Anchor.BottomLeft,
|
||||||
|
Anchor = Anchor.BottomLeft,
|
||||||
Size = new Vector2(87f, 20f),
|
Size = new Vector2(87f, 20f),
|
||||||
Masking = true,
|
Masking = true,
|
||||||
Children = new Drawable[]
|
Children = new Drawable[]
|
||||||
@ -155,10 +157,12 @@ namespace osu.Game.Screens.Select.Leaderboards
|
|||||||
},
|
},
|
||||||
new FillFlowContainer
|
new FillFlowContainer
|
||||||
{
|
{
|
||||||
|
Origin = Anchor.BottomLeft,
|
||||||
|
Anchor = Anchor.BottomLeft,
|
||||||
AutoSizeAxes = Axes.Both,
|
AutoSizeAxes = Axes.Both,
|
||||||
Direction = FillDirection.Horizontal,
|
Direction = FillDirection.Horizontal,
|
||||||
Spacing = new Vector2(10f, 0f),
|
Spacing = new Vector2(10f, 0f),
|
||||||
Margin = new MarginPadding { Left = edge_margin, },
|
Margin = new MarginPadding { Left = edge_margin },
|
||||||
Children = new Drawable[]
|
Children = new Drawable[]
|
||||||
{
|
{
|
||||||
maxCombo = new ScoreComponentLabel(FontAwesome.fa_link, Score.MaxCombo.ToString()),
|
maxCombo = new ScoreComponentLabel(FontAwesome.fa_link, Score.MaxCombo.ToString()),
|
||||||
@ -307,35 +311,55 @@ namespace osu.Game.Screens.Select.Leaderboards
|
|||||||
|
|
||||||
private class ScoreComponentLabel : Container
|
private class ScoreComponentLabel : Container
|
||||||
{
|
{
|
||||||
|
private const float icon_size = 20;
|
||||||
|
|
||||||
|
private readonly FillFlowContainer content;
|
||||||
|
|
||||||
|
protected override Container<Drawable> Content => content;
|
||||||
|
|
||||||
public ScoreComponentLabel(FontAwesome icon, string value)
|
public ScoreComponentLabel(FontAwesome icon, string value)
|
||||||
{
|
{
|
||||||
Anchor = Anchor.CentreLeft;
|
AutoSizeAxes = Axes.Y;
|
||||||
Origin = Anchor.CentreLeft;
|
Width = 60;
|
||||||
Size = new Vector2(60f, 20f);
|
|
||||||
Padding = new MarginPadding { Top = 10f, };
|
|
||||||
|
|
||||||
Children = new Drawable[]
|
InternalChild = content = new FillFlowContainer
|
||||||
{
|
{
|
||||||
new SpriteIcon
|
AutoSizeAxes = Axes.Both,
|
||||||
|
Direction = FillDirection.Horizontal,
|
||||||
|
Children = new Drawable[]
|
||||||
{
|
{
|
||||||
Origin = Anchor.Centre,
|
new Container
|
||||||
Icon = FontAwesome.fa_square,
|
{
|
||||||
Colour = OsuColour.FromHex(@"3087ac"),
|
Anchor = Anchor.CentreLeft,
|
||||||
Rotation = 45,
|
Origin = Anchor.CentreLeft,
|
||||||
Size = new Vector2(20),
|
AutoSizeAxes = Axes.Both,
|
||||||
Shadow = true,
|
Children = new[]
|
||||||
},
|
{
|
||||||
new SpriteIcon
|
new SpriteIcon
|
||||||
{
|
{
|
||||||
Origin = Anchor.Centre,
|
Anchor = Anchor.Centre,
|
||||||
Icon = icon,
|
Origin = Anchor.Centre,
|
||||||
Colour = OsuColour.FromHex(@"a4edff"),
|
Size = new Vector2(icon_size),
|
||||||
Size = new Vector2(14),
|
Rotation = 45,
|
||||||
},
|
Colour = OsuColour.FromHex(@"3087ac"),
|
||||||
new GlowingSpriteText(value, @"Exo2.0-Bold", 17, Color4.White, OsuColour.FromHex(@"83ccfa"))
|
Icon = FontAwesome.fa_square,
|
||||||
{
|
Shadow = true,
|
||||||
Origin = Anchor.CentreLeft,
|
},
|
||||||
Margin = new MarginPadding { Left = 15, },
|
new SpriteIcon
|
||||||
|
{
|
||||||
|
Anchor = Anchor.Centre,
|
||||||
|
Origin = Anchor.Centre,
|
||||||
|
Size = new Vector2(icon_size - 6),
|
||||||
|
Colour = OsuColour.FromHex(@"a4edff"),
|
||||||
|
Icon = icon,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
new GlowingSpriteText(value, @"Exo2.0-Bold", 17, Color4.White, OsuColour.FromHex(@"83ccfa"))
|
||||||
|
{
|
||||||
|
Anchor = Anchor.CentreLeft,
|
||||||
|
Origin = Anchor.CentreLeft,
|
||||||
|
},
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user