Esempio n. 1
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
            });
        }
Esempio n. 2
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
            });
        }
Esempio n. 3
0
        public ProgressNotification()
        {
            IconContent.Add(new Box
            {
                RelativeSizeAxes = Axes.Both,
            });

            Content.Add(textDrawable = new OsuTextFlowContainer(t =>
            {
                t.TextSize = 16;
            })
            {
                Colour           = OsuColour.Gray(128),
                AutoSizeAxes     = Axes.Y,
                RelativeSizeAxes = Axes.X,
            });

            NotificationContent.Add(progressBar = new ProgressBar
            {
                Origin           = Anchor.BottomLeft,
                Anchor           = Anchor.BottomLeft,
                RelativeSizeAxes = Axes.X,
            });

            State = ProgressNotificationState.Queued;

            // don't close on click by default.
            Activated = () => false;
        }
Esempio n. 4
0
 private void load(OsuColour colours)
 {
     IconContent.Add(new Drawable[]
     {
         new Box
         {
             RelativeSizeAxes = Axes.Both,
             ColourInfo       = ColourInfo.GradientVertical(colours.YellowDark, colours.Yellow)
         },
         new TextAwesome
         {
             Anchor = Anchor.Centre,
             Icon   = FontAwesome.fa_upload,
             Colour = Color4.White,
         }
     });
 }
Esempio n. 5
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),
         }
     });
 }
Esempio n. 6
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
                    }
                });
            }
Esempio n. 7
0
        public ProgressNotification()
        {
            IconContent.Add(new Box
            {
                RelativeSizeAxes = Axes.Both,
            });

            Content.Add(textDrawable = new OsuSpriteText
            {
                TextSize         = 16,
                Colour           = OsuColour.Gray(128),
                AutoSizeAxes     = Axes.Y,
                RelativeSizeAxes = Axes.X,
            });

            NotificationContent.Add(progressBar = new ProgressBar
            {
                Origin           = Anchor.BottomLeft,
                Anchor           = Anchor.BottomLeft,
                RelativeSizeAxes = Axes.X,
            });

            State = ProgressNotificationState.Queued;
        }