Example #1
0
    private void CheckGamepadMove()
    {
        if (_gamepadManager.GetStickPosY(0) < -_stickDeadZone)
        {
            _hasMoved = true;
            UnSelectText(_currentIndex);
            _currentIndex++;
            if (_currentIndex > _maxIndex)
            {
                _currentIndex = 0;
            }

            SelectText(_currentIndex);
        }
        else if (_gamepadManager.GetStickPosY(0) > _stickDeadZone)
        {
            _hasMoved = true;
            UnSelectText(_currentIndex);
            _currentIndex--;
            if (_currentIndex < 0)
            {
                _currentIndex = _maxIndex;
            }

            SelectText(_currentIndex);
        }
    }