Used for both controlling volume and displaying the volume.
Inheritance: DescriptionMenuEntry
示例#1
0
        /// <summary>
        /// Initializes a new instance of the <see cref="PauseMenu"/> class.
        /// </summary>
        /// <param name="position">The position.</param>
        /// <param name="actions">The actions.</param>
        /// <param name="spacing">The spacing.</param>
        public PauseMenu(Vector2 position, MenuAction[] actions, float spacing)
            : base(position, actions)
        {
            MenuEntry resume = new MenuEntry(
                "Resume",
                new MenuAction[]
                {
                    new MenuAction(ActionType.Select, new QuitPauseScreenDelegate())
                },
                position);

            VolumeControlDisplayEntry music = new VolumeControlDisplayEntry(
                "Music Volume",
                string.Empty,
                new MenuAction[] { },
                position + new Vector2(0, spacing),
                new Vector2(0, 300),
                0.9f,
                0.9f,
                true,
                false);

            VolumeControlDisplayEntry sound = new VolumeControlDisplayEntry(
                "Sound Volume",
                string.Empty,
                new MenuAction[] { },
                position + new Vector2(0, 2 * spacing),
                new Vector2(0, 300),
                0.9f,
                0.9f,
                false,
                false);

            MenuEntry quit = new MenuEntry(
                "Exit",
                new MenuAction[]
                {
                    new MenuAction(ActionType.Select, new GoToTitleDelegate())
                },
                position + new Vector2(0, 3 * spacing));

            resume.UpperMenu = quit;
            resume.LowerMenu = music;

            music.UpperMenu = resume;
            music.LowerMenu = sound;

            sound.UpperMenu = music;
            sound.LowerMenu = quit;

            quit.UpperMenu = sound;
            quit.LowerMenu = resume;

            this.Add(resume);
            this.Add(music);
            this.Add(sound);
            this.Add(quit);
        }
示例#2
0
        /// <summary>
        /// Initializes a new instance of the <see cref="PauseMenu"/> class.
        /// </summary>
        /// <param name="position">The position.</param>
        /// <param name="actions">The actions.</param>
        /// <param name="spacing">The spacing.</param>
        public PauseMenu(Vector2 position, MenuAction[] actions, float spacing)
            : base(position, actions)
        {
            MenuEntry resume = new MenuEntry(
                "Resume",
                new MenuAction[]
            {
                new MenuAction(ActionType.Select, new QuitPauseScreenDelegate())
            },
                position);

            VolumeControlDisplayEntry music = new VolumeControlDisplayEntry(
                "Music Volume",
                string.Empty,
                new MenuAction[] { },
                position + new Vector2(0, spacing),
                new Vector2(0, 300),
                0.9f,
                0.9f,
                true,
                false);

            VolumeControlDisplayEntry sound = new VolumeControlDisplayEntry(
                "Sound Volume",
                string.Empty,
                new MenuAction[] { },
                position + new Vector2(0, 2 * spacing),
                new Vector2(0, 300),
                0.9f,
                0.9f,
                false,
                false);

            MenuEntry quit = new MenuEntry(
                "Exit",
                new MenuAction[]
            {
                new MenuAction(ActionType.Select, new GoToTitleDelegate())
            },
                position + new Vector2(0, 3 * spacing));

            resume.UpperMenu = quit;
            resume.LowerMenu = music;

            music.UpperMenu = resume;
            music.LowerMenu = sound;

            sound.UpperMenu = music;
            sound.LowerMenu = quit;

            quit.UpperMenu = sound;
            quit.LowerMenu = resume;

            this.Add(resume);
            this.Add(music);
            this.Add(sound);
            this.Add(quit);
        }
        /// <summary>
        /// Initializes a new instance of the <see cref="BoxArtMenu"/> class.
        /// </summary>
        /// <param name="position">The position.</param>
        /// <param name="actions">The actions.</param>
        /// <param name="spacing">The spacing.</param>
        public BoxArtMenu(Vector2 position, MenuAction[] actions, float spacing)
            : base(position, actions)
        {
            this.spacing = spacing;

            VolumeControlDisplayEntry music = new VolumeControlDisplayEntry(
                "Music Volume",
                "Press Left and Right to set the music\nvolume for the game.",
                new MenuAction[] { },
                position,
                new Vector2(1342, 400),
                1f,
                0.99f,
                true,
                true);

            VolumeControlDisplayEntry sound = new VolumeControlDisplayEntry(
                "Sound Volume",
                "Press Left and Right to set the sound\nvolume for the game.",
                new MenuAction[] { },
                position + new Vector2(0, spacing),
                new Vector2(1342, 400),
                1f,
                0.99f,
                false,
                true);

            DescriptionMenuEntry storage = new DescriptionMenuEntry(
                "Storage Device",
                "Press #A to change the Storage Device used\nfor saving scores. No device selection menu\nwill be displayed if you only have one\ndevice connected.",
                new MenuAction[]
                {
                    new MenuAction(ActionType.Select, new ChangeStorageDeviceDelegate())
                },
                position + new Vector2(0, 2 * spacing));

            DescriptionMenuEntry credits = new DescriptionMenuEntry(
                "Credits",
                "Press #A to see the names of the developers.",
                new MenuAction[]
                {
                    new MenuAction(ActionType.Select, new ShowCreditsDelegate())
                },
                position + new Vector2(0, 3 * spacing));

            DescriptionMenuEntry quit = new DescriptionMenuEntry(
                "Exit",
                "Press #A to exit the game.",
                new MenuAction[]
                {
                    new MenuAction(ActionType.Select, new QuitGameDeleage())
                },
                position + new Vector2(0, 4 * spacing));

            // Do not "loop around".
            music.LowerMenu = sound;

            sound.UpperMenu = music;
            sound.LowerMenu = storage;

            storage.UpperMenu = sound;
            storage.LowerMenu = credits;

            credits.UpperMenu = storage;
            credits.LowerMenu = quit;

            quit.UpperMenu = credits;

            this.Add(music);
            this.Add(sound);
            this.Add(storage);
            this.Add(credits);
            this.Add(quit);
        }
示例#4
0
        /// <summary>
        /// Initializes a new instance of the <see cref="BoxArtMenu"/> class.
        /// </summary>
        /// <param name="position">The position.</param>
        /// <param name="actions">The actions.</param>
        /// <param name="spacing">The spacing.</param>
        public BoxArtMenu(Vector2 position, MenuAction[] actions, float spacing)
            : base(position, actions)
        {
            this.spacing = spacing;

            VolumeControlDisplayEntry music = new VolumeControlDisplayEntry(
                "Music Volume",
                "Press Left and Right to set the music\nvolume for the game.",
                new MenuAction[] { },
                position,
                new Vector2(1342, 400),
                1f,
                0.99f,
                true,
                true);

            VolumeControlDisplayEntry sound = new VolumeControlDisplayEntry(
                "Sound Volume",
                "Press Left and Right to set the sound\nvolume for the game.",
                new MenuAction[] { },
                position + new Vector2(0, spacing),
                new Vector2(1342, 400),
                1f,
                0.99f,
                false,
                true);

            DescriptionMenuEntry storage = new DescriptionMenuEntry(
                "Storage Device",
                "Press #A to change the Storage Device used\nfor saving scores. No device selection menu\nwill be displayed if you only have one\ndevice connected.",
                new MenuAction[]
            {
                new MenuAction(ActionType.Select, new ChangeStorageDeviceDelegate())
            },
                position + new Vector2(0, 2 * spacing));

            DescriptionMenuEntry credits = new DescriptionMenuEntry(
                "Credits",
                "Press #A to see the names of the developers.",
                new MenuAction[]
            {
                new MenuAction(ActionType.Select, new ShowCreditsDelegate())
            },
                position + new Vector2(0, 3 * spacing));

            DescriptionMenuEntry quit = new DescriptionMenuEntry(
                "Exit",
                "Press #A to exit the game.",
                new MenuAction[]
            {
                new MenuAction(ActionType.Select, new QuitGameDeleage())
            },
                position + new Vector2(0, 4 * spacing));

            // Do not "loop around".
            music.LowerMenu = sound;

            sound.UpperMenu = music;
            sound.LowerMenu = storage;

            storage.UpperMenu = sound;
            storage.LowerMenu = credits;

            credits.UpperMenu = storage;
            credits.LowerMenu = quit;

            quit.UpperMenu = credits;

            this.Add(music);
            this.Add(sound);
            this.Add(storage);
            this.Add(credits);
            this.Add(quit);
        }