mirror of
https://github.com/ppy/osu.git
synced 2025-01-15 16:42:57 +08:00
Show beatmap panels for selected spotlight
This commit is contained in:
parent
2b0b789980
commit
b83ee6dabf
@ -16,6 +16,8 @@ using osu.Game.Online.API.Requests;
|
|||||||
using osu.Game.Overlays.Rankings.Tables;
|
using osu.Game.Overlays.Rankings.Tables;
|
||||||
using osu.Game.Online.API.Requests.Responses;
|
using osu.Game.Online.API.Requests.Responses;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
|
using osuTK;
|
||||||
|
using osu.Game.Overlays.Direct;
|
||||||
|
|
||||||
namespace osu.Game.Overlays
|
namespace osu.Game.Overlays
|
||||||
{
|
{
|
||||||
@ -38,6 +40,9 @@ namespace osu.Game.Overlays
|
|||||||
[Resolved]
|
[Resolved]
|
||||||
private IAPIProvider api { get; set; }
|
private IAPIProvider api { get; set; }
|
||||||
|
|
||||||
|
[Resolved]
|
||||||
|
private RulesetStore rulesets { get; set; }
|
||||||
|
|
||||||
public RankingsOverlay()
|
public RankingsOverlay()
|
||||||
: base(OverlayColourScheme.Green)
|
: base(OverlayColourScheme.Green)
|
||||||
{
|
{
|
||||||
@ -209,7 +214,28 @@ namespace osu.Game.Overlays
|
|||||||
return new CountriesTable(1, countryRequest.Result.Countries);
|
return new CountriesTable(1, countryRequest.Result.Countries);
|
||||||
|
|
||||||
case GetSpotlightRankingsRequest spotlightRequest:
|
case GetSpotlightRankingsRequest spotlightRequest:
|
||||||
return new ScoresTable(1, spotlightRequest.Result.Users);
|
return new FillFlowContainer
|
||||||
|
{
|
||||||
|
AutoSizeAxes = Axes.Y,
|
||||||
|
RelativeSizeAxes = Axes.X,
|
||||||
|
Direction = FillDirection.Vertical,
|
||||||
|
Spacing = new Vector2(0, 20),
|
||||||
|
Children = new Drawable[]
|
||||||
|
{
|
||||||
|
new ScoresTable(1, spotlightRequest.Result.Users),
|
||||||
|
new FillFlowContainer
|
||||||
|
{
|
||||||
|
AutoSizeAxes = Axes.Y,
|
||||||
|
RelativeSizeAxes = Axes.X,
|
||||||
|
Spacing = new Vector2(10),
|
||||||
|
Children = spotlightRequest.Result.BeatmapSets.Select(b => new DirectGridPanel(b.ToBeatmapSet(rulesets))
|
||||||
|
{
|
||||||
|
Anchor = Anchor.TopCentre,
|
||||||
|
Origin = Anchor.TopCentre,
|
||||||
|
}).ToList()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
return null;
|
return null;
|
||||||
|
Loading…
Reference in New Issue
Block a user