public override void HandleInput(InputState input)
        {
            PlayerIndex playerIndex;
            if (input.IsMenuSelect(ControllingPlayer, out playerIndex))
            {

                if (Accepted != null)
                    Accepted(this, new PlayerIndexEventArgs(playerIndex));

                ExitScreen();
            }
            else if (input.IsMenuCancel(ControllingPlayer, out playerIndex))
            {
                if (Cancelled != null)
                    Cancelled(this, new PlayerIndexEventArgs(playerIndex));

                ExitScreen();
            }
        }
Exemplo n.º 2
0
        public override void HandleInput(InputState input)
        {
            if (input.IsMenuUp(GamerOne.PlayerIndex))
            {
                selectedEntry--;

                if (selectedEntry < 0)
                    selectedEntry = menuEntries.Count - 1;
            }

            if (input.IsMenuDown(GamerOne.PlayerIndex))
            {
                selectedEntry++;

                if (selectedEntry >= menuEntries.Count)
                    selectedEntry = 0;
            }

            PlayerIndex playerIndex;

            if (input.IsMenuSelect(GamerOne.PlayerIndex, out playerIndex))
            {
                OnSelectEntry(selectedEntry, playerIndex);

            }
            else if (input.IsMenuCancel(GamerOne.PlayerIndex, out playerIndex))
            {

                OnCancel(playerIndex);

            }

            SelectedEntry = selectedEntry;
        }