Ejemplo n.º 1
0
        /// <summary>
        /// Update selected button based on input
        /// </summary>
        private void UpdateSelection(Input.Stick state)
        {
            MenuManager.uniqueFrameInputUsed[IndexAssociatedPlayerScreen] = true;
            if (DeSelectOnMove)
            {
                IsClicked = false;
            }

            // Set selected button from 4 possible choices
            switch (state)
            {
            case Input.Stick.Up:
                if (NeighborUp != null)
                {
                    NeighborUp.IsCurrentSelection = true;
                    IsCurrentSelection            = false;
                }
                break;

            case Input.Stick.Right:
                if (NeighborRight != null)
                {
                    NeighborRight.IsCurrentSelection = true;
                    IsCurrentSelection = false;
                }
                break;

            case Input.Stick.Down:
                if (NeighborDown != null)
                {
                    NeighborDown.IsCurrentSelection = true;
                    IsCurrentSelection = false;
                }
                break;

            case Input.Stick.Left:
                if (NeighborLeft != null)
                {
                    NeighborLeft.IsCurrentSelection = true;
                    IsCurrentSelection = false;
                }
                break;
            }
        }
Ejemplo n.º 2
0
        private void UpdateSelection(Input.Stick state)
        {
            MenuManager.uniqueFrameInputUsed[IndexAssociatedPlayerScreen] = true;
            switch (state)
            {
            case Input.Stick.Up:
                if (NeighborUp != null)
                {
                    NeighborUp.IsCurrentSelection = true;
                    IsCurrentSelection            = false;
                }
                break;

            case Input.Stick.Right:
                if (NeighborRight != null)
                {
                    NeighborRight.IsCurrentSelection = true;
                    IsCurrentSelection = false;
                }
                break;

            case Input.Stick.Down:
                if (NeighborDown != null)
                {
                    NeighborDown.IsCurrentSelection = true;
                    IsCurrentSelection = false;
                }
                break;

            case Input.Stick.Left:
                if (NeighborLeft != null)
                {
                    NeighborLeft.IsCurrentSelection = true;
                    IsCurrentSelection = false;
                }
                break;
            }
        }