Class: SDL2::Joystick::Axes

Inherits:
Components show all
Defined in:
lib/sdl2/joystick/axes.rb

Overview

Enumerates axes on a joystick.

Instance Method Summary collapse

Methods inherited from Components

#each, #initialize

Constructor Details

This class inherits a constructor from SDL2::Joystick::Components

Instance Method Details

#[](idx) ⇒ Object

Axis accessor via index



17
18
19
# File 'lib/sdl2/joystick/axes.rb', line 17

def [](idx)
  SDL2::joystick_get_axis(@joystick,idx)       
end

#countObject

How many Axes are there?



11
12
13
# File 'lib/sdl2/joystick/axes.rb', line 11

def count
  SDL2::joystick_num_axes(@joystick)
end