class SDL2::Joystick::Buttons
Enumerates buttons on a joystick.
Public Instance Methods
[](idx)
click to toggle source
Button accessor via index @returns Integer {0=>RELEASED,1=>PRESSED}
# File lib/sdl2/joystick/buttons.rb, line 17 def [](idx) SDL2::joystick_get_button(@joystick,idx) end
count()
click to toggle source
How many buttons are there?
# File lib/sdl2/joystick/buttons.rb, line 11 def count SDL2::joystick_num_buttons(@joystick) end