Class: SDL2::Joystick::Hats
- Inherits:
-
Components
- Object
- Components
- SDL2::Joystick::Hats
- Defined in:
- lib/sdl2/joystick/hats.rb
Overview
Enumerates hats on a joystick.
Instance Method Summary collapse
-
#[](idx) ⇒ Object
Hat accessor via index.
-
#count ⇒ Object
How many hats are there?.
Methods inherited from Components
Constructor Details
This class inherits a constructor from SDL2::Joystick::Components
Instance Method Details
#[](idx) ⇒ Object
Hat accessor via index
17 18 19 |
# File 'lib/sdl2/joystick/hats.rb', line 17 def [](idx) SDL2::joystick_get_hat(@joystick,idx) end |
#count ⇒ Object
How many hats are there?
11 12 13 |
# File 'lib/sdl2/joystick/hats.rb', line 11 def count SDL2::joystick_num_hats(@joystick) end |