示例#1
0
        /// <summary>
        /// Constructor.
        /// </summary>
        public MenuScreen(string menuTitle)
        {
            this.menuTitle = menuTitle;
            // menus generally only need Tap for menu selection
            EnabledGestures = GestureType.Tap;

            TransitionOnTime = TimeSpan.FromSeconds(0.5);
            TransitionOffTime = TimeSpan.FromSeconds(0.5);

            menuUp = new InputAction(
                new Buttons[] { Buttons.DPadUp, Buttons.LeftThumbstickUp },
                new Keys[] { Keys.Up },
                true);
            menuDown = new InputAction(
                new Buttons[] { Buttons.DPadDown, Buttons.LeftThumbstickDown },
                new Keys[] { Keys.Down },
                true);
            menuSelect = new InputAction(
                new Buttons[] { Buttons.A, Buttons.Start },
                new Keys[] { Keys.Enter, Keys.Space },
                true);
            menuCancel = new InputAction(
                new Buttons[] { Buttons.B, Buttons.Back },
                new Keys[] { Keys.Escape },
                true);
        }
示例#2
0
        /// <summary>
        /// Constructor lets the caller specify whether to include the standard
        /// "A=ok, B=cancel" usage text prompt.
        /// </summary>
        public MessageBoxScreen(string message, bool includeUsageText)
        {
            const string USAGE_TEXT = "\nA button, Space, Enter = ok" +
            "\nB button, Esc = cancel";

            if (includeUsageText)
            {
                this.message = string.Format("{0}{1}", message, USAGE_TEXT);
            }
            else
            {
                this.message = message;
            }

            this.IsPopup = true;

            this.TransitionOnTime = TimeSpan.FromSeconds(0.2);
            this.TransitionOffTime = TimeSpan.FromSeconds(0.2);

            this.menuSelect = new InputAction(
                new Buttons[] { Buttons.A, Buttons.Start },
                new Keys[] { Keys.Space, Keys.Enter },
                true);
            this.menuCancel = new InputAction(
                new Buttons[] { Buttons.B, Buttons.Back },
                new Keys[] { Keys.Escape, Keys.Back },
                true);
        }
示例#3
0
        /// <summary>
        /// Constructor.
        /// </summary>
        public MenuScreen(string menuTitle)
        {
            this.menuTitle = menuTitle;

            TransitionOnTime = TimeSpan.FromSeconds(0.5);
            TransitionOffTime = TimeSpan.FromSeconds(0.5);

            menuUp = new InputAction(
                new Buttons[] { Buttons.DPadUp, Buttons.LeftThumbstickUp },
                new Keys[] { Keys.Up },
                true);
            menuDown = new InputAction(
                new Buttons[] { Buttons.DPadDown, Buttons.LeftThumbstickDown },
                new Keys[] { Keys.Down },
                true);
            menuLeft = new InputAction(
                new Buttons[] { Buttons.DPadLeft, Buttons.LeftThumbstickLeft },
                new Keys[] { Keys.Left },
                true);
            menuRight = new InputAction(
                new Buttons[] { Buttons.DPadRight, Buttons.LeftThumbstickRight },
                new Keys[] { Keys.Right },
                true);
            menuSelect = new InputAction(
                new Buttons[] { Buttons.A, Buttons.Start },
                new Keys[] { Keys.Enter, Keys.Space },
                true);
            menuCancel = new InputAction(
                null,
                new Keys[] { Keys.Escape },
                true);
        }
        public override void Activate(bool instancePreserved)
        {
            if (!instancePreserved)
            {
                if (content == null)
                {
                    content = new ContentManager(ScreenManager.Game.Services, "Content");
                }
                backToMenu = new InputAction(new Buttons[] { Buttons.Back }, null, true);
                gameFont = content.Load<SpriteFont>("gamefont");
                background_pattern = content.Load<Texture2D>("background");
                splogo = content.Load<Texture2D>("SPLOGO");
                transBack = content.Load<Texture2D>("transparent");
                TeamLogo = content.Load<Texture2D>("AK-DUO LOGO");

                creditpos = ScreenDimensions.Y / 2 - gameFont.MeasureString(creditsTitle).X / 2;
                TouchPanel.EnabledGestures =
                GestureType.Tap;

                // once the load has finished, we use ResetElapsedTime to tell the game's
                // timing mechanism that we have just finished a very long frame, and that
                // it should not try to catch up.
                ScreenManager.Game.ResetElapsedTime();
            }
        }
        /// <summary>
        /// Constructor lets the caller specify whether to include the standard
        /// "A=ok, B=cancel" usage text prompt.
        /// </summary>
        public RestartLocalNetwork(string message, bool includeUsageText)
        {
            const string usageText = "\nX button, l, L = LOCAL" +
                                     "\nA button, n, N = NETWORK" +
                                     "\nB button, ESC  = Cancel";

            if (includeUsageText)
                this.message = message + usageText;
            else
                this.message = message;

            IsPopup = true;

            TransitionOnTime = TimeSpan.FromSeconds(0.2);
            TransitionOffTime = TimeSpan.FromSeconds(0.2);

            menuLocal = new InputAction(
                new Buttons[] { Buttons.X},
                new Keys[] { Keys.L},
                true);
            menuNetwork = new InputAction(
                new Buttons[] { Buttons.A},
                new Keys[] { Keys.N},
                true);
            menuCancel = new InputAction(
                new Buttons[] { Buttons.B },
                new Keys[] { Keys.Escape },
                true);
        }
示例#6
0
        /// <summary>
        /// Constructor.
        /// </summary>
        public MenuScreen(string menuTitle)
        {
            this.menuTitle = menuTitle;

            TransitionOnTime = TimeSpan.FromSeconds(0.5);
            TransitionOffTime = TimeSpan.FromSeconds(0.5);

            menuUp = new InputAction(
                new Buttons[] { Buttons.DPadUp, Buttons.LeftThumbstickUp },
                new Keys[] { Keys.Up },
                true);
            menuDown = new InputAction(
                new Buttons[] { Buttons.DPadDown, Buttons.LeftThumbstickDown },
                new Keys[] { Keys.Down },
                true);
            menuSelect = new InputAction(
                new Buttons[] { Buttons.A },
                new Keys[] { Keys.Enter },
                true);
            menuCancel = new InputAction(
                new Buttons[] { Buttons.B },
                new Keys[] { Keys.Escape },
                true);

            camera = new ChasingCamera2D();
            camera2 = new ChasingCamera2D();
            camera.maxChaseSpeed = 1200;
            //camera.Pos = new Vector2(1920 / 2, 1080 / 2);
            camera2.maxChaseSpeed = 1200;
            //camera2.Pos = new Vector2(1920 / 2, 1080 / 2);
        }
示例#7
0
        /// <summary>
        /// Constructor lets the caller specify whether to include the standard
        /// "A=ok, B=cancel" usage text prompt.
        /// </summary>
        public MessageBoxScreen(String message, bool includeUsageText, bool includePromptAdvance)
        {
            this.scale = 1.0f;
            const String promptAdvance = "\n{Enter}...";
            const String usageText = "\nA button, Space, Enter = ok" +
                                     "\nB button, Esc = cancel";

            if (includeUsageText)
                this.message = message + usageText;
            else
                this.message = message;

            if (includePromptAdvance)
                this.message = message + promptAdvance;

            IsPopup = true;

            TransitionOnTime = TimeSpan.FromSeconds(0.2);
            TransitionOffTime = TimeSpan.FromSeconds(0.2);

            menuSelect = new InputAction(
                new Buttons[] { Buttons.A, Buttons.Start },
                new Keys[] { Keys.Space, Keys.Enter },
                true);
            menuCancel = new InputAction(
                new Buttons[] { Buttons.B, Buttons.Back },
                new Keys[] { Keys.Escape, Keys.Back },
                true);
        }
        /// <summary>
        /// Constructor.
        /// </summary>
        public MenuScreen(string menuTitle)
        {
            this.menuTitle = menuTitle;

            TransitionOnTime = TimeSpan.FromSeconds(0.5);
            TransitionOffTime = TimeSpan.FromSeconds(0.5);

            menuUp = new InputAction(
                new Buttons[] { Buttons.DPadUp, Buttons.LeftThumbstickUp },
                new Keys[] { Keys.Up },
                new InputGesture[] { new InputGesture(InputGestureType.Rotate, Direction.RIGHT) },
                true);
            menuDown = new InputAction(
                new Buttons[] { Buttons.DPadDown, Buttons.LeftThumbstickDown },
                new Keys[] { Keys.Down },
                new InputGesture[] { new InputGesture(InputGestureType.Rotate, Direction.LEFT) },
                true);
            menuSelect = new InputAction(
                new Buttons[] { Buttons.A, Buttons.Start },
                new Keys[] { Keys.Enter, Keys.Space },
                new InputGesture[] { new InputGesture(InputGestureType.Zoom, Direction.IN) },
                true);
            menuCancel = new InputAction(
                new Buttons[] { Buttons.B, Buttons.Back },
                new Keys[] { Keys.Escape },
                new InputGesture[0], // TODO: Add back gesture
                true);
        }
示例#9
0
        /// <summary>
        /// Constructor lets the caller specify whether to include the standard
        /// "A=ok, B=cancel" usage text prompt.
        /// </summary>
        public MessageBoxScreen(string message, bool includeUsageText)
        {
            const string usageText = "\n     YES" +
                                     "\n     NO";

            if (includeUsageText)
            {
                this.includeUsageText = true;
                this.message = message + usageText;
            }
            else
                this.message = message;

            IsPopup = true;

            TransitionOnTime = TimeSpan.FromSeconds(0.2);
            TransitionOffTime = TimeSpan.FromSeconds(0.2);

            menuSelect = new InputAction(
                new Buttons[] { Buttons.A },
                new Keys[] { Keys.Enter },
                true);
            menuCancel = new InputAction(
                new Buttons[] { Buttons.B },
                new Keys[] { Keys.Escape },
                true);
        }
        /// <summary>
        /// Build a menu screen for selecting body parts to work with
        /// </summary>
        /// <param name="bodyParts">List of body parts to load, each should coinside with a body part folder</param>
        public PinExplorerMenuScreen(string bodyPart, List<Tuple<int, int>> pinScreens, DissectionScreen dissectionScreen)
            : base("Select a screen to explore pins")
        {
            this.dissectionScreen = dissectionScreen;
            this.bodyPart = bodyPart;
            this.pinScreens = pinScreens;
            this.numParts = this.pinScreens.Count;
            this.verticalCentre = Convert.ToDouble(ProgramSettings.ResolutionHeight) / 2;

            int imageWidth = (int)((Convert.ToDouble(ProgramSettings.ResolutionWidth)) / (Convert.ToDouble(ProgramSettings.ResolutionHeight)) * (int)(Convert.ToInt32(ProgramSettings.ResolutionHeight) / 4));
            int imageSpace = imageWidth * numParts;
            int freeSpace = Convert.ToInt32(ProgramSettings.ResolutionWidth) - imageSpace;
            this.horizontalStart = freeSpace / (numParts + 1);
            this.horizontalDistance = imageWidth + horizontalStart;

            menuLeft = new InputAction(
                new Buttons[] { Buttons.DPadLeft, Buttons.LeftThumbstickLeft },
                new Keys[] { Keys.Left },
                new InputGesture[] { new InputGesture(InputGestureType.Rotate, Direction.LEFT) },
                true);
            menuRight = new InputAction(
                new Buttons[] { Buttons.DPadDown, Buttons.LeftThumbstickRight },
                new Keys[] { Keys.Right },
                new InputGesture[] { new InputGesture(InputGestureType.Rotate, Direction.RIGHT) },
                true);
        }
        /// <summary>
        /// Build a menu screen for selecting body parts to work with
        /// </summary>
        /// <param name="bodyParts">List of body parts to load, each should coinside with a body part folder</param>
        public DissectionMenuScreen(string[] bodyParts)
            : base("Select a Dissection")
        {
            this.bodyParts = bodyParts;
            this.numParts = 3;//this.bodyParts.Length;
            this.verticalCentre = Convert.ToDouble(ProgramSettings.ResolutionHeight) / 2;

            int imageWidth = (int)((Convert.ToDouble(ProgramSettings.ResolutionWidth)) / (Convert.ToDouble(ProgramSettings.ResolutionHeight)) * (int)(Convert.ToInt32(ProgramSettings.ResolutionHeight) / 4));
            int imageSpace = imageWidth * numParts;
            int freeSpace = Convert.ToInt32(ProgramSettings.ResolutionWidth) - imageSpace;
            this.horizontalStart = freeSpace / (numParts + 1);
            this.horizontalDistance = imageWidth + horizontalStart;

            menuLeft = new InputAction(
                new Buttons[] { Buttons.DPadLeft, Buttons.LeftThumbstickLeft },
                new Keys[] { Keys.Left },
                new InputGesture[] { new InputGesture(InputGestureType.Rotate, Direction.LEFT) },
                true);
            menuRight = new InputAction(
                new Buttons[] { Buttons.DPadDown, Buttons.LeftThumbstickRight },
                new Keys[] { Keys.Right },
                new InputGesture[] { new InputGesture(InputGestureType.Rotate, Direction.RIGHT) },
                true);

            cursors.Click += OnCursorEvent;
        }
示例#12
0
        public TestScreen()
        {
            dialogBox = new DialogBox();

            proceedActions = new InputAction(new Buttons[] { Buttons.A }, new Keys[] { Keys.Space }, true);
            resetActions = new InputAction(new Buttons[] { Buttons.Back, Buttons.B }, new Keys[] { Keys.Home }, true);
            cueCount = -1;
        }
示例#13
0
        public GameplayScreen()
        {
            TransitionOnTime = TimeSpan.FromSeconds(1.5);
            TransitionOffTime = TimeSpan.FromSeconds(0.5);

            pauseAction = new InputAction(
                new Buttons[] { Buttons.Start, Buttons.Back },
                true);
        }
示例#14
0
        /// <summary>
        /// Constructor.
        /// </summary>
        public ActualGameScreen()
        {
            TransitionOnTime = TimeSpan.FromSeconds(1.5);
              TransitionOffTime = TimeSpan.FromSeconds(0.5);

              pauseAction = new InputAction(
              new Buttons[] { Buttons.Start, Buttons.Back },
              new Keys[] { Keys.Escape },
              true);
        }
示例#15
0
        /// <summary>
        /// Constructor.
        /// </summary>
        public GameplayScreen(BcGame game)
        {
            this.game	=	game;

            this.pauseAction	=	new InputAction(
                new Buttons[] { },
                new Keys[] { Keys.Escape },
                true
            );
        }
示例#16
0
        /// <summary>
        /// Constructor.
        /// </summary>
        public LevelScreen()
        {
            TransitionOnTime = TimeSpan.FromSeconds(1.5);
            TransitionOffTime = TimeSpan.FromSeconds(0.5);

            pauseAction = new InputAction(
                new Buttons[] { Buttons.Start, Buttons.Back },
                new Keys[] { Keys.Escape },
                true);

            debugAction = new InputAction(
                new Buttons[0],
                new Keys[] { Keys.F1 },
                true);

            zoomInAction = new InputAction(
                null,
                new Keys[] {Keys.Q},
                false);

            zoomOutAction = new InputAction(
                null,
                new Keys[] { Keys.E },
                false);

            #region player controls:
            moveDownAction = new InputAction(
                null,
                new Keys[] { Keys.S, Keys.Down },
                false);

            moveUpAction = new InputAction(
                new Buttons[] {Buttons.A, Buttons.DPadUp },
                new Keys[] { Keys.W, Keys.Up, Keys.Space },
                false);

            moveRightAction = new InputAction(
                new Buttons[] { Buttons.DPadRight, Buttons.LeftThumbstickRight },
                new Keys[] { Keys.D, Keys.Right },
                false);

            moveLeftAction = new InputAction(
                new Buttons[] { Buttons.DPadLeft, Buttons.LeftThumbstickLeft },
                new Keys[] { Keys.A, Keys.Left },
                false);
            #endregion

            world = null;

            player = null;
            scenario = null;
            debug = false;

            playerControl = true;
        }
示例#17
0
        public MenuScreen(string title)
        {
            menuTitle = title;

            TransitionOnTime = TimeSpan.FromSeconds(0.5);
            TransitionOffTime = TimeSpan.FromSeconds(0.5);

            menuCancel = new InputAction(new Buttons[] { Buttons.Back }, true);

            EnabledGestures = GestureType.Tap;
        }
示例#18
0
        public DeadScreen(int levelfrom)
        {
            this.levelFrom = levelfrom;
            // define and action
            pauseAction = new InputAction(
                new Buttons[] { Buttons.Start, Buttons.Back },
                new Keys[] { Keys.Escape },
                true);

            TransitionOnTime = TimeSpan.FromSeconds(1.5);
            TransitionOffTime = TimeSpan.FromSeconds(0.5);
        }
示例#19
0
        public GameplayScreen(int mazeSize)
        {
            maze = new Maze(mazeSize);
            playerPosition = maze.Cells[0, 0];

            TransitionOnTime  = TimeSpan.FromSeconds(1.5);
            TransitionOffTime = TimeSpan.FromSeconds(0.5);

            pauseAction = new InputAction(
                new Buttons[] { Buttons.Start, Buttons.Back },
                new Keys[] { Keys.Escape },
                true);

            toggleShortestPathAction = new InputAction(
                new Buttons[] { Buttons.RightTrigger },
                new Keys[] { Keys.P },
                true);

            toggleBreadcrumbsAction = new InputAction(
                new Buttons[] { Buttons.LeftTrigger },
                new Keys[] { Keys.B },
                true);

            toggleScoreAction = new InputAction(
                new Buttons[] { Buttons.Y },
                new Keys[] { Keys.Y },
                true);

            playerMoveUpAction = new InputAction(
                new Buttons[] { Buttons.DPadUp, Buttons.LeftThumbstickUp },
                new Keys[] { Keys.Up, Keys.W },
                true);

            playerMoveDownAction = new InputAction(
                new Buttons[] { Buttons.DPadDown, Buttons.LeftThumbstickDown },
                new Keys[] { Keys.Down, Keys.S },
                true);

            playerMoveLeftAction = new InputAction(
                new Buttons[] { Buttons.DPadLeft, Buttons.LeftThumbstickLeft },
                new Keys[] { Keys.Left, Keys.A },
                true);

            playerMoveRightAction = new InputAction(
                new Buttons[] { Buttons.DPadRight, Buttons.LeftThumbstickRight },
                new Keys[] { Keys.Right, Keys.D },
                true);

            showHintAction = new InputAction(
                new Buttons[] { Buttons.X },
                new Keys[] { Keys.H },
                false);
        }
示例#20
0
        /// <summary>
        /// Constructor.
        /// </summary>
        public GameplayScreen(Game game)
        {
            TransitionOnTime = TimeSpan.FromSeconds(1.5);
            TransitionOffTime = TimeSpan.FromSeconds(0.5);

            pauseAction = new InputAction(
                new Buttons[] { Buttons.Start, Buttons.Back },
                new Keys[] { Keys.Escape },
                true);

            this.game = game;
        }
示例#21
0
        /// <summary>
        /// Creates the PhoneMenuScreen with a particular title.
        /// </summary>
        /// <param name="title">The title of the screen</param>
        public PhoneMenuScreen(string title)
        {
            menuTitle = title;

            TransitionOnTime = TimeSpan.FromSeconds(0.5);
            TransitionOffTime = TimeSpan.FromSeconds(0.5);

            // Create the menuCancel action
            menuCancel = new InputAction(new Buttons[] { Buttons.Back }, null, true);

            // We need tap gestures to hit the buttons
            EnabledGestures = GestureType.Tap;
        }
示例#22
0
        /// <summary>
        /// Constructor.
        /// </summary>
        public TestingPickupable()
        {
            TransitionOnTime = TimeSpan.FromSeconds(1.5);
            TransitionOffTime = TimeSpan.FromSeconds(0.5);

            world = new World(new Vector2(0, 0));

            // define and action
            pauseAction = new InputAction(
                new Buttons[] { Buttons.Start, Buttons.Back },
                new Keys[] { Keys.Escape },
                true);
        }
示例#23
0
        public GameplayScreen()
        {
            TransitionOnTime = TimeSpan.FromSeconds(1.5);
            TransitionOffTime = TimeSpan.FromSeconds(0.5);

            pauseAction = new InputAction(
                new Buttons[] { Buttons.Start, Buttons.Back },
                new Keys[] { Keys.Escape },
                true);

            timer = new NewTimer();
            // Set Timer Time here
            timer.Time = new TimeSpan(0, 5, 0);
        }
示例#24
0
        /// <summary>
        /// Constructor.
        /// </summary>
        public GameplayScreen(bool isNetworkGame)
        {
            TransitionOnTime = TimeSpan.FromSeconds(1.5);
            TransitionOffTime = TimeSpan.FromSeconds(0.5);

            pauseAction = new InputAction(
                new Buttons[] { Buttons.Start, Buttons.Back },
                new Keys[] { Keys.Escape },
                true);

            main = this;

            _isNetwork = isNetworkGame;
        }
示例#25
0
        /// <summary>
        /// Constructor.
        /// </summary>
        public PressStartScreen(Cue bgm)
        {
            this.bgm = bgm;
            TransitionOnTime = TimeSpan.FromSeconds(1);
            TransitionOffTime = TimeSpan.FromSeconds(0.5);

            pressStartAction = new InputAction(
                new Buttons[] { Buttons.Start, Buttons.A },
                new Keys[] { Keys.Enter },
                true);

            mirrorCamera = new ChasingCamera2D();
            mirrorCamera.Pos = new Vector2(GlobalHelper.GameWidth / 2, GlobalHelper.GameHeight / 2);
            //mirrorCamera.maxChaseSpeed *= 4;
        }
示例#26
0
文件: Tetris.cs 项目: V1ncam/Tetris
        public Tetris()
        {
            TransitionOnTime = TimeSpan.FromSeconds(1.5);
            TransitionOffTime = TimeSpan.FromSeconds(0.5);

            pauseAction = new InputAction(
                new Buttons[] { Buttons.Start, Buttons.Back },
                true);

            EnabledGestures =
                GestureType.Tap |
                GestureType.HorizontalDrag |
                GestureType.VerticalDrag |
                GestureType.DragComplete;
        }
        /// <summary>
        /// Constructor lets the caller specify whether to include the standard
        /// "A=ok, B=cancel" usage text prompt.
        /// </summary>
        public LevelCompleteScreen(string message, bool includeUsageText)
        {
            this.message = message;
            IsPopup = true;

            TransitionOnTime = TimeSpan.FromSeconds(0.2);
            TransitionOffTime = TimeSpan.FromSeconds(0.2);

            menuSelect = new InputAction(
                new Buttons[] { Buttons.A, Buttons.Start },
                new Keys[] { Keys.Enter },
                true);
            menuCancel = new InputAction(
                new Buttons[] { Buttons.B, Buttons.Back },
                new Keys[] {  },
                true);
        }
示例#28
0
        /// <summary>
        ///   Constructor fills in the menu contents.
        /// </summary>
        public MainMenuScreen()
            : base("")
        {
            // Create our menu entries.
            var playGameMenuEntry = new MenuEntry
                                        {
                                            Text = LR.Play
                                        };

            var optionsMenuEntry = new MenuEntry
                                       {
                                           Text = LR.Settings,
                                       };
            var exitMenuEntry = new MenuEntry
                                    {
                                        Text = LR.Exit,
                                    };

            // Hook up menu event handlers.
            playGameMenuEntry.Selected += PlayGameMenuEntrySelected;
            optionsMenuEntry.Selected += OptionsMenuEntrySelected;
            exitMenuEntry.Selected += OnCancel;

            // Add entries to the menu.
            MenuEntries.Add(playGameMenuEntry);
            MenuEntries.Add(optionsMenuEntry);
            MenuEntries.Add(exitMenuEntry);

            _menuLeft = new InputAction(
                new[] {Buttons.DPadLeft, Buttons.LeftThumbstickLeft},
                new[] {Keys.Left},
                true);

            _menuRight = new InputAction(
                new[] {Buttons.DPadRight, Buttons.LeftThumbstickRight},
                new[] {Keys.Right},
                true);

            //create maps list
            _maps = new List<string>
                        {
                            "test.lua",
                            "underworld.lua"
                        };
        }
示例#29
0
        /// <summary>
        /// Constructor lets the caller specify whether to include the standard
        /// "A=ok, B=cancel" usage text prompt.
        /// </summary>
        public ConfirmBoxScreen(string message, bool includeUsageText)
        {
            const string usageText = "\n Boton A, Espacio o Enter para confirmar";

            if (includeUsageText)
                this.message = message + usageText;
            else
                this.message = message;

            IsPopup = true;

            TransitionOnTime = TimeSpan.FromSeconds(0.2);
            TransitionOffTime = TimeSpan.FromSeconds(0.2);

            menuSelect = new InputAction(
                new Buttons[] { Buttons.A, Buttons.Start },
                new Keys[] { Keys.Space, Keys.Enter },
                true);
        }
        public ResolutionMenuScreen()
            : base("Graphics Settings")
        {
            menuLeft = new InputAction(
                new Buttons[] { Buttons.DPadLeft, Buttons.LeftThumbstickLeft },
                new Keys[] { Keys.Left },
                new InputGesture[] { new InputGesture(InputGestureType.Rotate, Direction.LEFT) },
                true);

            menuRight = new InputAction(
                new Buttons[] { Buttons.DPadRight, Buttons.LeftThumbstickRight },
                new Keys[] { Keys.Right },
                new InputGesture[] { new InputGesture(InputGestureType.Rotate, Direction.RIGHT) },
                true);

            // Get available resolutions for this user
            GetAvailableResolutions();

            // Get current resolution
            this.height = ProgramSettings.ResolutionHeight;
            this.width = ProgramSettings.ResolutionWidth;
            this.fullscreen = ProgramSettings.FullscreenMode;

            // Set currentResolutionIndex
            for (int i = 0; i < this.availableResolutions.Count; i++)
                if (this.availableResolutions.ElementAt(i).Height.ToString() == this.height && this.availableResolutions.ElementAt(i).Width.ToString() == this.width)
                    this.currentResolutionIndex = i;

            SetMenuEntryText();

            // Hook up events
            this.resolutionMenuEntry.Selected += new EventHandler<PlayerIndexEventArgs>(resolutionMenuEntrySelected);
            this.fullscreenMenuEntry.Selected += new EventHandler<PlayerIndexEventArgs>(fullscreenMenuEntrySelected);
            this.applyMenuEntry.Selected += new EventHandler<PlayerIndexEventArgs>(applyMenuEntrySelected);
            this.backMenuEntry.Selected += new EventHandler<PlayerIndexEventArgs>(backMenuEntrySelected);

            MenuEntries.Add(this.resolutionMenuEntry);
            MenuEntries.Add(this.fullscreenMenuEntry);
            MenuEntries.Add(this.applyMenuEntry);
            MenuEntries.Add(this.backMenuEntry);
        }