Exemple #1
0
        public SimpleNotification()
        {
            IconContent.AddRange(new Drawable[]
            {
                IconBackgound = new Box
                {
                    RelativeSizeAxes = Axes.Both,
                    Colour           = ColourInfo.GradientVertical(OsuColour.Gray(0.2f), OsuColour.Gray(0.6f))
                },
                iconDrawable = new SpriteIcon
                {
                    Anchor = Anchor.Centre,
                    Origin = Anchor.Centre,
                    Icon   = icon,
                    Size   = new Vector2(20),
                }
            });

            Content.Add(textDrawable = new TextFlowContainer(t => t.TextSize = 16)
            {
                Colour           = OsuColour.Gray(128),
                AutoSizeAxes     = Axes.Y,
                RelativeSizeAxes = Axes.X,
                Text             = text
            });
        }
Exemple #2
0
        public SimpleNotification()
        {
            IconContent.AddRange(new Drawable[]
            {
                IconBackgound = new Box
                {
                    RelativeSizeAxes = Axes.Both,
                    ColourInfo       = ColourInfo.GradientVertical(OsuColour.Gray(0.2f), OsuColour.Gray(0.6f))
                },
                iconDrawable = new TextAwesome
                {
                    Anchor   = Anchor.Centre,
                    Origin   = Anchor.Centre,
                    Icon     = icon,
                    TextSize = 20
                }
            });

            Content.Add(textDrawable = new OsuSpriteText
            {
                TextSize         = 16,
                Colour           = OsuColour.Gray(128),
                AutoSizeAxes     = Axes.Y,
                RelativeSizeAxes = Axes.X,
                Text             = text
            });
        }
Exemple #3
0
 private void load(OsuColour colours)
 {
     IconContent.AddRange(new Drawable[]
     {
         new Box
         {
             RelativeSizeAxes = Axes.Both,
             Colour           = ColourInfo.GradientVertical(colours.YellowDark, colours.Yellow)
         },
         new SpriteIcon
         {
             Anchor = Anchor.Centre,
             Origin = Anchor.Centre,
             Icon   = FontAwesome.Solid.Upload,
             Colour = Color4.White,
             Size   = new Vector2(20),
         }
     });
 }
Exemple #4
0
            private void load(OsuColour colours, OsuGame game)
            {
                this.game = game;

                IconContent.AddRange(new Drawable[]
                {
                    new Box
                    {
                        RelativeSizeAxes = Axes.Both,
                        ColourInfo       = ColourInfo.GradientVertical(colours.YellowDark, colours.Yellow)
                    },
                    new TextAwesome
                    {
                        Anchor   = Anchor.Centre,
                        Origin   = Anchor.Centre,
                        Icon     = FontAwesome.fa_upload,
                        Colour   = Color4.White,
                        TextSize = 20
                    }
                });
            }