Esempio n. 1
0
        public TestSceneBeatmapListingSearchSection()
        {
            OsuSpriteText query;
            OsuSpriteText ruleset;
            OsuSpriteText category;

            Add(section = new BeatmapListingSearchSection
            {
                Anchor = Anchor.Centre,
                Origin = Anchor.Centre,
            });

            Add(new FillFlowContainer
            {
                AutoSizeAxes = Axes.Both,
                Direction    = FillDirection.Vertical,
                Spacing      = new Vector2(0, 5),
                Children     = new Drawable[]
                {
                    query    = new OsuSpriteText(),
                    ruleset  = new OsuSpriteText(),
                    category = new OsuSpriteText(),
                }
            });

            section.Query.BindValueChanged(q => query.Text       = $"Query: {q.NewValue}", true);
            section.Ruleset.BindValueChanged(r => ruleset.Text   = $"Ruleset: {r.NewValue}", true);
            section.Category.BindValueChanged(c => category.Text = $"Category: {c.NewValue}", true);
        }
Esempio n. 2
0
 private void load()
 {
     Children = new Drawable[]
     {
         new Box
         {
             RelativeSizeAxes = Axes.Both,
             Colour           = ColourProvider.Background6
         },
         new BasicScrollContainer
         {
             RelativeSizeAxes = Axes.Both,
             ScrollbarVisible = false,
             Child            = new ReverseChildIDFillFlowContainer <Drawable>
             {
                 AutoSizeAxes     = Axes.Y,
                 RelativeSizeAxes = Axes.X,
                 Direction        = FillDirection.Vertical,
                 Spacing          = new Vector2(0, 10),
                 Children         = new Drawable[]
                 {
                     new FillFlowContainer
                     {
                         AutoSizeAxes     = Axes.Y,
                         RelativeSizeAxes = Axes.X,
                         Direction        = FillDirection.Vertical,
                         Masking          = true,
                         EdgeEffect       = new EdgeEffectParameters
                         {
                             Colour = Color4.Black.Opacity(0.25f),
                             Type   = EdgeEffectType.Shadow,
                             Radius = 3,
                             Offset = new Vector2(0f, 1f),
                         },
                         Children = new Drawable[]
                         {
                             new BeatmapListingHeader(),
                             searchSection = new BeatmapListingSearchSection(),
                         }
                     },
                     new Container
                     {
                         AutoSizeAxes     = Axes.Y,
                         RelativeSizeAxes = Axes.X,
                         Children         = new Drawable[]
                         {
                             new Box
                             {
                                 RelativeSizeAxes = Axes.Both,
                                 Colour           = ColourProvider.Background4,
                             },
                             new FillFlowContainer
                             {
                                 RelativeSizeAxes = Axes.X,
                                 AutoSizeAxes     = Axes.Y,
                                 Children         = new Drawable[]
                                 {
                                     new Container
                                     {
                                         RelativeSizeAxes = Axes.X,
                                         Height           = 40,
                                         Children         = new Drawable[]
                                         {
                                             new Box
                                             {
                                                 RelativeSizeAxes = Axes.Both,
                                                 Colour           = ColourProvider.Background5
                                             },
                                             sortControl = new BeatmapListingSortTabControl
                                             {
                                                 Anchor = Anchor.CentreLeft,
                                                 Origin = Anchor.CentreLeft,
                                                 Margin = new MarginPadding {
                                                     Left = 20
                                                 }
                                             }
                                         }
                                     },
                                     new Container
                                     {
                                         AutoSizeAxes     = Axes.Y,
                                         RelativeSizeAxes = Axes.X,
                                         Padding          = new MarginPadding {
                                             Horizontal = 20
                                         },
                                         Children = new Drawable[]
                                         {
                                             panelTarget = new Container
                                             {
                                                 AutoSizeAxes     = Axes.Y,
                                                 RelativeSizeAxes = Axes.X,
                                             },
                                             loadingLayer = new LoadingLayer(panelTarget),
                                         }
                                     },
                                 }
                             }
                         }
                     }
                 }
             }
         }
     };
 }