mirror of
https://github.com/osukey/osukey.git
synced 2025-08-05 23:53:51 +09:00
Implement DashboardPopularBeatmapPanel component
This commit is contained in:
@ -112,7 +112,7 @@ namespace osu.Game.Overlays.Dashboard.Dashboard
|
||||
{
|
||||
AutoSizeAxes = Axes.Both,
|
||||
Direction = FillDirection.Horizontal,
|
||||
Spacing = new Vector2(5, 0),
|
||||
Spacing = new Vector2(3, 0),
|
||||
Margin = new MarginPadding { Top = 2 },
|
||||
Children = new Drawable[]
|
||||
{
|
||||
|
@ -0,0 +1,42 @@
|
||||
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
|
||||
// See the LICENCE file in the repository root for full licence text.
|
||||
|
||||
using osu.Framework.Graphics;
|
||||
using osu.Framework.Graphics.Containers;
|
||||
using osu.Framework.Graphics.Sprites;
|
||||
using osu.Game.Beatmaps;
|
||||
using osu.Game.Graphics;
|
||||
using osu.Game.Graphics.Sprites;
|
||||
using osuTK;
|
||||
|
||||
namespace osu.Game.Overlays.Dashboard.Dashboard
|
||||
{
|
||||
public class DashboardPopularBeatmapPanel : DashboardBeatmapPanel
|
||||
{
|
||||
public DashboardPopularBeatmapPanel(BeatmapSetInfo setInfo)
|
||||
: base(setInfo)
|
||||
{
|
||||
}
|
||||
|
||||
protected override Drawable CreateInfo() => new FillFlowContainer
|
||||
{
|
||||
AutoSizeAxes = Axes.Both,
|
||||
Direction = FillDirection.Horizontal,
|
||||
Spacing = new Vector2(3, 0),
|
||||
Colour = ColourProvider.Foreground1,
|
||||
Children = new Drawable[]
|
||||
{
|
||||
new SpriteIcon
|
||||
{
|
||||
Size = new Vector2(10),
|
||||
Icon = FontAwesome.Solid.Heart
|
||||
},
|
||||
new OsuSpriteText
|
||||
{
|
||||
Font = OsuFont.GetFont(size: 10),
|
||||
Text = SetInfo.OnlineInfo.FavouriteCount.ToString()
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user