Class: Rubygame::Events::JoystickButtonPressed
- Inherits:
-
Object
- Object
- Rubygame::Events::JoystickButtonPressed
- Includes:
- JoystickButtonEvent
- Defined in:
- lib/rubygame/events/joystick_events.rb
Overview
JoystickButtonPressed is an event that occurs when a joystick button has been pressed.
A joystick button is a button that can be pressed by the user’s thumbs or fingers. The number of buttons varies with the joystick. Most joysticks have at least two buttons; fancy ones can have up to 12 or even 20 buttons.
Like a mouse button, a joystick button is either “pressed” or “not pressed”, with no middle states.
Instance Attribute Summary
Attributes included from JoystickButtonEvent
Instance Method Summary collapse
-
#initialize(joystick_id, button) ⇒ JoystickButtonPressed
constructor
Creates a new JoystickButtonPressed instance.
Constructor Details
#initialize(joystick_id, button) ⇒ JoystickButtonPressed
Creates a new JoystickButtonPressed instance.
- joystick_id
-
an integer identifying which joystick changed. The first joystick is 0.
- button
-
an integer identifying which button was pressed. The first button on each joystick is 0.
149 150 151 |
# File 'lib/rubygame/events/joystick_events.rb', line 149 def initialize( joystick_id, ) super end |