public ScoreComponentLabel(LeaderboardScoreStatistic statistic) { TooltipText = statistic.Name; AutoSizeAxes = Axes.Both; Child = content = new FillFlowContainer { AutoSizeAxes = Axes.Both, Direction = FillDirection.Horizontal, Padding = new MarginPadding { Right = 10 }, Children = new Drawable[] { new Container { Anchor = Anchor.CentreLeft, Origin = Anchor.CentreLeft, AutoSizeAxes = Axes.Both, Children = new[] { new SpriteIcon { Anchor = Anchor.Centre, Origin = Anchor.Centre, Size = new Vector2(icon_size), Rotation = 45, Colour = Color4Extensions.FromHex(@"3087ac"), Icon = FontAwesome.Solid.Square, Shadow = true, }, new SpriteIcon { Anchor = Anchor.Centre, Origin = Anchor.Centre, Size = new Vector2(icon_size - 6), Colour = Color4Extensions.FromHex(@"a4edff"), Icon = statistic.Icon, }, }, }, new GlowingSpriteText { Anchor = Anchor.CentreLeft, Origin = Anchor.CentreLeft, TextColour = Color4.White, GlowColour = Color4Extensions.FromHex(@"83ccfa"), Text = statistic.Value, Font = OsuFont.GetFont(size: 17, weight: FontWeight.Bold), }, }, }; }
public ScoreComponentLabel(LeaderboardScoreStatistic statistic) { name = statistic.Name; AutoSizeAxes = Axes.Both; Child = content = new FillFlowContainer { AutoSizeAxes = Axes.Both, Direction = FillDirection.Horizontal, Children = new Drawable[] { new Container { Anchor = Anchor.CentreLeft, Origin = Anchor.CentreLeft, AutoSizeAxes = Axes.Both, Children = new[] { new SpriteIcon { Anchor = Anchor.Centre, Origin = Anchor.Centre, Size = new Vector2(icon_size), Rotation = 45, Colour = OsuColour.FromHex(@"3087ac"), Icon = FontAwesome.fa_square, Shadow = true, }, new SpriteIcon { Anchor = Anchor.Centre, Origin = Anchor.Centre, Size = new Vector2(icon_size - 6), Colour = OsuColour.FromHex(@"a4edff"), Icon = statistic.Icon, }, }, }, new GlowingSpriteText(statistic.Value, @"Exo2.0-Bold", 17, Color4.White, OsuColour.FromHex(@"83ccfa")) { Anchor = Anchor.CentreLeft, Origin = Anchor.CentreLeft, }, }, }; }