Esempio n. 1
0
            private void load(Bindable <TrackSong> activeTrack)
            {
                InternalChild = new Container
                {
                    RelativeSizeAxes = Axes.Both,
                    Children         = new Drawable[]
                    {
                        playButton = new CircularProgressPlayButton(TrackModel),
                        title      = new SpriteText
                        {
                            Origin = Anchor.CentreLeft,
                            Anchor = Anchor.CentreLeft,
                            Text   = TrackModel.SongName,
                            Font   = FontsManager.GetFont(size: 20, weight: FontWeight.Medium),
                            Colour = Color4.DarkGray,
                            Margin = new MarginPadding {
                                Left = 80
                            },
                            Padding = new MarginPadding {
                                Bottom = 2
                            }
                        },
                        heartIcon = new SpriteIcon
                        {
                            Origin = Anchor.CentreRight,
                            Anchor = Anchor.CentreRight,
                            Size   = new Vector2(16),
                            Icon   = FontAwesome.Solid.Heart,
                            Colour = Color4.LightGray
                        }
                    }
                };

                activeTrack.BindValueChanged(onActiveTrackChanged);
            }
Esempio n. 2
0
        public SongHeader()
        {
            RelativeSizeAxes = Axes.X;
            AutoSizeAxes     = Axes.Y;

            Child = new FillFlowContainer
            {
                Anchor           = Anchor.TopLeft,
                Origin           = Anchor.TopLeft,
                Direction        = FillDirection.Vertical,
                Spacing          = new Vector2(0, -10),
                AutoSizeAxes     = Axes.Y,
                RelativeSizeAxes = Axes.X,
                Children         = new Drawable[]
                {
                    artist = new SpriteText
                    {
                        Text             = "ganen",
                        Font             = FontsManager.GetFont(size: 40, weight: FontWeight.Black),
                        Colour           = Color4.LightGray,
                        RelativeSizeAxes = Axes.X,
                        Anchor           = Anchor.CentreLeft,
                        Origin           = Anchor.CentreLeft,
                        Truncate         = true,
                        Spacing          = new Vector2(2, 0)
                    },
                    title = new SpriteText
                    {
                        Text             = "my top 2020 songs, I guess",
                        Font             = FontsManager.GetFont(size: 80, weight: FontWeight.Black),
                        Colour           = Color4.Black,
                        Anchor           = Anchor.CentreLeft,
                        Origin           = Anchor.CentreLeft,
                        RelativeSizeAxes = Axes.X,
                        Truncate         = true,
                    },
                }
            };
        }
Esempio n. 3
0
 private void load()
 {
     InternalChildren = new Drawable[]
     {
         new Box
         {
             RelativeSizeAxes = Axes.Both,
             Colour           = Color4.White
         },
         new SpriteText
         {
             Origin = Anchor.TopLeft,
             Anchor = Anchor.TopLeft,
             Margin = new MarginPadding {
                 Top = 20, Left = 100
             },
             Text   = "ganen. 2020.",
             Font   = FontsManager.GetFont(weight: FontWeight.SemiBold),
             Colour = Color4.Black
         },
         new GridContainer
         {
             RelativeSizeAxes = Axes.Both,
             ColumnDimensions = new[]
             {
                 new Dimension(GridSizeMode.Absolute, size: 500),
                 new Dimension(GridSizeMode.Distributed)
             },
             Content = new[]
             {
                 new Drawable[]
                 {
                     new Container
                     {
                         RelativeSizeAxes = Axes.Both,
                         Children         = new Drawable[]
                         {
                             new Container
                             {
                                 Origin           = Anchor.Centre,
                                 Anchor           = Anchor.Centre,
                                 RelativeSizeAxes = Axes.Y,
                                 Width            = 300,
                                 Margin           = new MarginPadding {
                                     Top = 300
                                 },
                                 Masking      = true,
                                 CornerRadius = 20,
                                 Children     = new Drawable[]
                                 {
                                     new Box
                                     {
                                         RelativeSizeAxes = Axes.Both,
                                         Colour           = Color4Extensions.FromHex(@"358879"),
                                     },
                                     new Box
                                     {
                                         RelativeSizeAxes = Axes.Both,
                                         Colour           = ColourInfo.GradientVertical(Color4.Black.Opacity(0.1f), Color4.Black.Opacity(0.6f)),
                                     }
                                 },
                             },
                             new AlbumArt
                             {
                                 Origin = Anchor.Centre,
                                 Anchor = Anchor.Centre,
                                 Margin = new MarginPadding {
                                     Left = 100
                                 },
                                 Size = new Vector2(300),
                             }
                         }
                     },
                     new GridContainer
                     {
                         RelativeSizeAxes = Axes.Both,
                         RowDimensions    = new[]
                         {
                             new Dimension(GridSizeMode.AutoSize),
                             new Dimension(GridSizeMode.Distributed)
                         },
                         Content = new[]
                         {
                             new Drawable[]
                             {
                                 // Add hacky way to add space on first grid
                                 new Container
                                 {
                                     RelativeSizeAxes = Axes.X,
                                     Height           = 150
                                 }
                             },
                             new Drawable[]
                             {
                                 new FillFlowContainer
                                 {
                                     RelativeSizeAxes = Axes.Both,
                                     Direction        = FillDirection.Vertical,
                                     Children         = new Drawable[]
                                     {
                                         new SongHeader(),
                                         new TrackListScreen
                                         {
                                             Margin = new MarginPadding {
                                                 Top = 40
                                             }
                                         }
                                     }
                                 }
                             }
                         }
                     }
                 },
             }
         }
     };
 }