示例#1
0
            private void beatmapUpdated(ValueChangedEvent <WorkingBeatmap> map)
            {
                Drawable newBackground;

                if (map.NewValue.Background == null)
                {
                    newBackground = new Box
                    {
                        Alpha            = 0,
                        RelativeSizeAxes = Axes.Both,
                        Anchor           = Anchor.Centre,
                        Origin           = Anchor.Centre,
                        Colour           = Colour4.FromHex("4A4A4C")
                    };
                }
                else
                {
                    newBackground = new Sprite
                    {
                        Anchor           = Anchor.Centre,
                        Origin           = Anchor.Centre,
                        Alpha            = 0,
                        RelativeSizeAxes = Axes.Both,
                        FillMode         = FillMode.Fill,
                        Texture          = map.NewValue.Background
                    };
                }

                bufferedContainer.Add(newBackground);
                background.FadeOut(1000, Easing.Out);
                newBackground.FadeIn(1000, Easing.In);
                background.Expire();
            }