mirror of
https://github.com/ppy/osu
synced 2024-12-13 18:37:04 +00:00
44 lines
1.4 KiB
C#
44 lines
1.4 KiB
C#
// 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 System.Collections.Generic;
|
|
using osu.Framework.Allocation;
|
|
using osu.Framework.Graphics;
|
|
using osu.Framework.Graphics.Containers;
|
|
using osu.Game.Beatmaps;
|
|
using osuTK;
|
|
|
|
namespace osu.Game.Overlays.Dashboard.Home
|
|
{
|
|
public class DashboardBeatmapListing : CompositeDrawable
|
|
{
|
|
private readonly List<BeatmapSetInfo> newBeatmaps;
|
|
private readonly List<BeatmapSetInfo> popularBeatmaps;
|
|
|
|
public DashboardBeatmapListing(List<BeatmapSetInfo> newBeatmaps, List<BeatmapSetInfo> popularBeatmaps)
|
|
{
|
|
this.newBeatmaps = newBeatmaps;
|
|
this.popularBeatmaps = popularBeatmaps;
|
|
}
|
|
|
|
[BackgroundDependencyLoader]
|
|
private void load()
|
|
{
|
|
RelativeSizeAxes = Axes.X;
|
|
AutoSizeAxes = Axes.Y;
|
|
InternalChild = new FillFlowContainer<DrawableBeatmapList>
|
|
{
|
|
RelativeSizeAxes = Axes.X,
|
|
AutoSizeAxes = Axes.Y,
|
|
Direction = FillDirection.Vertical,
|
|
Spacing = new Vector2(0, 10),
|
|
Children = new DrawableBeatmapList[]
|
|
{
|
|
new DrawableNewBeatmapList(newBeatmaps),
|
|
new DrawablePopularBeatmapList(popularBeatmaps)
|
|
}
|
|
};
|
|
}
|
|
}
|
|
}
|