示例#1
0
            public override void Load()
            {
                base.Load();
                logoBounceContainer = new AutoSizeContainer();

                logo = new Sprite(Game.Textures.Get(@"menu-osu"))
                {
                    Anchor = Anchor.Centre,
                    Origin = Anchor.Centre,
                };

                Sprite ripple = new Sprite(Game.Textures.Get(@"menu-osu"))
                {
                    Anchor = Anchor.Centre,
                    Origin = Anchor.Centre,
                    Alpha  = 0.4f
                };

                ripple.ScaleTo(1.1f, 500);
                ripple.FadeOut(500);
                ripple.Transformations.ForEach(t =>
                {
                    t.Loop      = true;
                    t.LoopDelay = 300;
                });

                logoBounceContainer.Add(logo);
                logoBounceContainer.Add(ripple);
                logoBounceContainer.Add(vis = new MenuVisualisation()
                {
                    Anchor   = Anchor.Centre,
                    Origin   = Anchor.Centre,
                    Size     = logo.Size,
                    Additive = true,
                    //Radius = logo.Size.X / 2 * 0.96f,
                    Alpha = 0.2f,
                });
                Add(logoBounceContainer);
            }
示例#2
0
文件: OsuLogo.cs 项目: yheno/osu
        public OsuLogo()
        {
            Anchor = Anchor.Centre;
            Origin = Anchor.Centre;

            AutoSizeAxes = Axes.Both;

            Children = new Drawable[]
            {
                logoBounceContainer = new Container
                {
                    AutoSizeAxes = Axes.Both,
                    Children = new Drawable[]
                    {
                        logoHoverContainer = new Container
                        {
                            AutoSizeAxes = Axes.Both,
                            Children = new Drawable[]
                            {
                                new BufferedContainer
                                {
                                    AutoSizeAxes = Axes.Both,
                                    Children = new Drawable[]
                                    {
                                        logoContainer = new CircularContainer
                                        {
                                            Anchor = Anchor.Centre,
                                            RelativeSizeAxes = Axes.Both,
                                            Scale = new Vector2(0.8f),
                                            Children = new Drawable[]
                                            {
                                                colourAndTriangles = new Container
                                                {
                                                    RelativeSizeAxes = Axes.Both,
                                                    Anchor = Anchor.Centre,
                                                    Origin = Anchor.Centre,
                                                    Children = new Drawable[]
                                                    {
                                                        new Box
                                                        {
                                                            RelativeSizeAxes = Axes.Both,
                                                            Colour = new Color4(233, 103, 161, 255),
                                                        },
                                                        new OsuLogoTriangles
                                                        {
                                                            RelativeSizeAxes = Axes.Both,
                                                        },
                                                    }
                                                },

                                            },
                                        },
                                        logo = new Sprite
                                        {
                                            Anchor = Anchor.Centre,
                                            Origin = Anchor.Centre,
                                            Scale = new Vector2(0.5f),
                                        },
                                    }
                                },
                                rippleContainer = new Container
                                {
                                    Anchor = Anchor.Centre,
                                    Origin = Anchor.Centre,
                                    Children = new Drawable[]
                                    {
                                        ripple = new Sprite()
                                        {
                                            Anchor = Anchor.Centre,
                                            Origin = Anchor.Centre,
                                            BlendingMode = BlendingMode.Additive,
                                            Scale = new Vector2(0.5f),
                                            Alpha = 0.15f
                                        }
                                    }
                                },
                                vis = new MenuVisualisation
                                {
                                    Anchor = Anchor.Centre,
                                    Origin = Anchor.Centre,
                                    Size = logo.Size,
                                    BlendingMode = BlendingMode.Additive,
                                    Alpha = 0.2f,
                                }
                            }
                        }
                    }
                }
            };
        }
示例#3
0
文件: OsuLogo.cs 项目: Kirishikun/osu
        public OsuLogo()
        {
            Anchor = Anchor.Centre;
            Origin = Anchor.Centre;

            AutoSizeAxes = Axes.Both;

            Children = new Drawable[]
            {
                logoBounceContainer = new Container
                {
                    AutoSizeAxes = Axes.Both,
                    Children     = new Drawable[]
                    {
                        logoHoverContainer = new Container
                        {
                            AutoSizeAxes = Axes.Both,
                            Children     = new Drawable[]
                            {
                                new BufferedContainer
                                {
                                    AutoSizeAxes = Axes.Both,
                                    Children     = new Drawable[]
                                    {
                                        logoContainer = new CircularContainer
                                        {
                                            Anchor           = Anchor.Centre,
                                            RelativeSizeAxes = Axes.Both,
                                            Scale            = new Vector2(0.8f),
                                            Children         = new Drawable[]
                                            {
                                                colourAndTriangles = new Container
                                                {
                                                    RelativeSizeAxes = Axes.Both,
                                                    Anchor           = Anchor.Centre,
                                                    Origin           = Anchor.Centre,
                                                    Children         = new Drawable[]
                                                    {
                                                        new Box
                                                        {
                                                            RelativeSizeAxes = Axes.Both,
                                                            Colour           = new Color4(233, 103, 161, 255),
                                                        },
                                                        new OsuLogoTriangles
                                                        {
                                                            RelativeSizeAxes = Axes.Both,
                                                        },
                                                    }
                                                },
                                            },
                                        },
                                        logo = new Sprite
                                        {
                                            Anchor = Anchor.Centre,
                                            Origin = Anchor.Centre,
                                            Scale  = new Vector2(0.5f),
                                        },
                                    }
                                },
                                rippleContainer = new Container
                                {
                                    Anchor   = Anchor.Centre,
                                    Origin   = Anchor.Centre,
                                    Children = new Drawable[]
                                    {
                                        ripple = new Sprite()
                                        {
                                            Anchor       = Anchor.Centre,
                                            Origin       = Anchor.Centre,
                                            BlendingMode = BlendingMode.Additive,
                                            Scale        = new Vector2(0.5f),
                                            Alpha        = 0.15f
                                        }
                                    }
                                },
                                vis = new MenuVisualisation
                                {
                                    Anchor       = Anchor.Centre,
                                    Origin       = Anchor.Centre,
                                    Size         = logo.Size,
                                    BlendingMode = BlendingMode.Additive,
                                    Alpha        = 0.2f,
                                }
                            }
                        }
                    }
                }
            };
        }