mirror of
https://github.com/osukey/osukey.git
synced 2025-05-30 01:47:30 +09:00
Move spotlight layout to it's own method
This commit is contained in:
parent
4dd25b42ae
commit
7757a3a30b
@ -218,7 +218,16 @@ namespace osu.Game.Overlays
|
||||
return new CountriesTable(1, countryRequest.Result.Countries);
|
||||
|
||||
case GetSpotlightRankingsRequest spotlightRequest:
|
||||
header.SpotlightSelector.ShowInfo(spotlightRequest.Result);
|
||||
return getSpotlightContent(spotlightRequest.Result);
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
private Drawable getSpotlightContent(GetSpotlightRankingsResponse response)
|
||||
{
|
||||
header.SpotlightSelector.ShowInfo(response);
|
||||
|
||||
return new FillFlowContainer
|
||||
{
|
||||
AutoSizeAxes = Axes.Y,
|
||||
@ -227,13 +236,13 @@ namespace osu.Game.Overlays
|
||||
Spacing = new Vector2(0, 20),
|
||||
Children = new Drawable[]
|
||||
{
|
||||
new ScoresTable(1, spotlightRequest.Result.Users),
|
||||
new ScoresTable(1, response.Users),
|
||||
new FillFlowContainer
|
||||
{
|
||||
AutoSizeAxes = Axes.Y,
|
||||
RelativeSizeAxes = Axes.X,
|
||||
Spacing = new Vector2(10),
|
||||
Children = spotlightRequest.Result.BeatmapSets.Select(b => new DirectGridPanel(b.ToBeatmapSet(rulesets))
|
||||
Children = response.BeatmapSets.Select(b => new DirectGridPanel(b.ToBeatmapSet(rulesets))
|
||||
{
|
||||
Anchor = Anchor.TopCentre,
|
||||
Origin = Anchor.TopCentre,
|
||||
@ -243,9 +252,6 @@ namespace osu.Game.Overlays
|
||||
};
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
private void loadContent(Drawable content)
|
||||
{
|
||||
scrollFlow.ScrollToStart();
|
||||
|
Loading…
x
Reference in New Issue
Block a user