mirror of
https://github.com/ppy/osu.git
synced 2024-11-15 05:57:29 +08:00
Make SpotlightSelector.ShowInfo use the full rankings response
This commit is contained in:
parent
00e010a061
commit
24e8a2bd69
@ -14,6 +14,7 @@ using osuTK;
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using osu.Framework.Graphics.UserInterface;
|
using osu.Framework.Graphics.UserInterface;
|
||||||
|
using osu.Game.Online.API.Requests;
|
||||||
|
|
||||||
namespace osu.Game.Overlays.Rankings
|
namespace osu.Game.Overlays.Rankings
|
||||||
{
|
{
|
||||||
@ -101,12 +102,12 @@ namespace osu.Game.Overlays.Rankings
|
|||||||
background.Colour = colourProvider.Dark3;
|
background.Colour = colourProvider.Dark3;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void ShowInfo(APISpotlight spotlight, int mapCount)
|
public void ShowInfo(GetSpotlightRankingsResponse response)
|
||||||
{
|
{
|
||||||
startDateColumn.Value = dateToString(spotlight.StartDate);
|
startDateColumn.Value = dateToString(response.Spotlight.StartDate);
|
||||||
endDateColumn.Value = dateToString(spotlight.EndDate);
|
endDateColumn.Value = dateToString(response.Spotlight.EndDate);
|
||||||
mapCountColumn.Value = mapCount.ToString();
|
mapCountColumn.Value = response.BeatmapSets.Count.ToString();
|
||||||
participantsColumn.Value = spotlight.Participants?.ToString("N0");
|
participantsColumn.Value = response.Spotlight.Participants?.ToString("N0");
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override void PopIn()
|
protected override void PopIn()
|
||||||
|
@ -217,7 +217,7 @@ namespace osu.Game.Overlays
|
|||||||
return new CountriesTable(1, countryRequest.Result.Countries);
|
return new CountriesTable(1, countryRequest.Result.Countries);
|
||||||
|
|
||||||
case GetSpotlightRankingsRequest spotlightRequest:
|
case GetSpotlightRankingsRequest spotlightRequest:
|
||||||
header.SpotlightSelector.ShowInfo(spotlightRequest.Result.Spotlight, spotlightRequest.Result.BeatmapSets.Count);
|
header.SpotlightSelector.ShowInfo(spotlightRequest.Result);
|
||||||
return new FillFlowContainer
|
return new FillFlowContainer
|
||||||
{
|
{
|
||||||
AutoSizeAxes = Axes.Y,
|
AutoSizeAxes = Axes.Y,
|
||||||
|
Loading…
Reference in New Issue
Block a user