Beispiel #1
0
 private Drawable createContent(GetSpotlightRankingsResponse response) => new FillFlowContainer
 {
     AutoSizeAxes     = Axes.Y,
     RelativeSizeAxes = Axes.X,
     Direction        = FillDirection.Vertical,
     Spacing          = new Vector2(0, 20),
     Children         = new Drawable[]
     {
         new ScoresTable(1, response.Users),
         // reverse ID flow is required for correct Z-ordering of the cards' expandable content (last card should be front-most).
         new ReverseChildIDFillFlowContainer <BeatmapCardNormal>
         {
             AutoSizeAxes     = Axes.Y,
             RelativeSizeAxes = Axes.X,
             Margin           = new MarginPadding {
                 Bottom = ExpandedContentScrollContainer.HEIGHT
             },
             Spacing  = new Vector2(10),
             Children = response.BeatmapSets.Select(b => new BeatmapCardNormal(b)
             {
                 Anchor = Anchor.TopCentre,
                 Origin = Anchor.TopCentre,
             }).ToList()
         }
     }
 };
Beispiel #2
0
        private void onSuccess(GetSpotlightRankingsResponse response)
        {
            LoadComponentAsync(createContent(response), loaded =>
            {
                selector.ShowInfo(response);

                content.Clear();
                content.Add(loaded);

                loading.Hide();
            }, (cancellationToken = new CancellationTokenSource()).Token);
        }
Beispiel #3
0
 private Drawable createContent(GetSpotlightRankingsResponse response) => new FillFlowContainer
 {
     AutoSizeAxes     = Axes.Y,
     RelativeSizeAxes = Axes.X,
     Direction        = FillDirection.Vertical,
     Spacing          = new Vector2(0, 20),
     Children         = new Drawable[]
     {
         new ScoresTable(1, response.Users),
         new FillFlowContainer
         {
             AutoSizeAxes     = Axes.Y,
             RelativeSizeAxes = Axes.X,
             Spacing          = new Vector2(10),
             Children         = response.BeatmapSets.Select(b => new GridBeatmapPanel(b)
             {
                 Anchor = Anchor.TopCentre,
                 Origin = Anchor.TopCentre,
             }).ToList()
         }
     }
 };