mirror of
https://github.com/osukey/osukey.git
synced 2025-05-31 02:17:34 +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);
|
return new CountriesTable(1, countryRequest.Result.Countries);
|
||||||
|
|
||||||
case GetSpotlightRankingsRequest spotlightRequest:
|
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
|
return new FillFlowContainer
|
||||||
{
|
{
|
||||||
AutoSizeAxes = Axes.Y,
|
AutoSizeAxes = Axes.Y,
|
||||||
@ -227,13 +236,13 @@ namespace osu.Game.Overlays
|
|||||||
Spacing = new Vector2(0, 20),
|
Spacing = new Vector2(0, 20),
|
||||||
Children = new Drawable[]
|
Children = new Drawable[]
|
||||||
{
|
{
|
||||||
new ScoresTable(1, spotlightRequest.Result.Users),
|
new ScoresTable(1, response.Users),
|
||||||
new FillFlowContainer
|
new FillFlowContainer
|
||||||
{
|
{
|
||||||
AutoSizeAxes = Axes.Y,
|
AutoSizeAxes = Axes.Y,
|
||||||
RelativeSizeAxes = Axes.X,
|
RelativeSizeAxes = Axes.X,
|
||||||
Spacing = new Vector2(10),
|
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,
|
Anchor = Anchor.TopCentre,
|
||||||
Origin = Anchor.TopCentre,
|
Origin = Anchor.TopCentre,
|
||||||
@ -243,9 +252,6 @@ namespace osu.Game.Overlays
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
private void loadContent(Drawable content)
|
private void loadContent(Drawable content)
|
||||||
{
|
{
|
||||||
scrollFlow.ScrollToStart();
|
scrollFlow.ScrollToStart();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user