class SDL2::Joystick::Hats

Enumerates hats on a joystick.

Public Instance Methods

[](idx) click to toggle source

Hat accessor via index @returns Integer (See: SDL2::HAT constants)

# File lib/sdl2/joystick/hats.rb, line 17
def [](idx)
  SDL2::joystick_get_hat(@joystick,idx)       
end
count() click to toggle source

How many hats are there?

# File lib/sdl2/joystick/hats.rb, line 11
def count
  SDL2::joystick_num_hats(@joystick)
end