Class: Rubygame::JoyBallEvent
Overview
Indicates that a Joystick trackball was moved.
This event has these attributes:
- joynum
-
the identifier number of the affected Joystick.
- ball
-
the identifier number of the trackball.
- rel
-
the relative movement of the trackball, [x,y].
Instance Attribute Summary collapse
-
#ball ⇒ Object
Returns the value of attribute ball.
-
#joynum ⇒ Object
Returns the value of attribute joynum.
-
#rel ⇒ Object
Returns the value of attribute rel.
Instance Method Summary collapse
-
#initialize(joy, ball, rel) ⇒ JoyBallEvent
constructor
A new instance of JoyBallEvent.
Constructor Details
#initialize(joy, ball, rel) ⇒ JoyBallEvent
Returns a new instance of JoyBallEvent.
336 337 338 339 340 341 |
# File 'lib/rubygame/event.rb', line 336 def initialize(joy,ball,rel) # eventually, joy could be int OR a Rubygame::Joystick instance, # which would be stored as joy or maybe joyinstance? @joynum = joy @ball, @rel = ball, rel end |
Instance Attribute Details
#ball ⇒ Object
Returns the value of attribute ball.
335 336 337 |
# File 'lib/rubygame/event.rb', line 335 def ball @ball end |
#joynum ⇒ Object
Returns the value of attribute joynum.
335 336 337 |
# File 'lib/rubygame/event.rb', line 335 def joynum @joynum end |
#rel ⇒ Object
Returns the value of attribute rel.
335 336 337 |
# File 'lib/rubygame/event.rb', line 335 def rel @rel end |