Esempio n. 1
0
        private Background createBackground()
        {
            Background newBackground;
            string     backgroundName;

            switch (introSequence.Value)
            {
            case IntroSequence.Welcome:
                backgroundName = "Intro/Welcome/menu-background";
                break;

            default:
                backgroundName = $@"Menu/menu-background-{currentDisplay % background_count + 1}";
                break;
            }

            if (user.Value?.IsSupporter ?? false)
            {
                switch (mode.Value)
                {
                case BackgroundSource.Beatmap:
                    newBackground = new BeatmapBackground(beatmap.Value, backgroundName);
                    break;

                default:
                    newBackground = new SkinnedBackground(skin.Value, backgroundName);
                    break;
                }
            }
            else
            {
                newBackground = new Background(backgroundName);
            }

            newBackground.Depth = currentDisplay;

            return(newBackground);
        }
Esempio n. 2
0
        private Background createBackground()
        {
            Background newBackground;

            if (user.Value?.IsSupporter ?? false)
            {
                switch (mode.Value)
                {
                    case BackgroundSource.Beatmap:
                        newBackground = new BeatmapBackground(beatmap.Value, backgroundName);
                        break;

                    default:
                        newBackground = new SkinnedBackground(skin.Value, backgroundName);
                        break;
                }
            }
            else
                newBackground = new Background(backgroundName);

            newBackground.Depth = currentDisplay;

            return newBackground;
        }