Class: Rubygame::MouseMotionEvent
Overview
Indicates that the mouse cursor moved.
This event has these attributes:
- pos
-
the new position of the cursor, in the form [x,y].
- rel
-
the relative movement of the cursor since the last update, [x,y].
- buttons
-
the mouse buttons that were being held during the movement, an Array of zero or more of these constants in module Rubygame (or the corresponding button number):
- MOUSE_LEFT
-
1; left mouse button
- MOUSE_MIDDLE
-
2; middle mouse button
- MOUSE_RIGHT
-
3; right mouse button
Instance Attribute Summary collapse
-
#buttons ⇒ Object
Returns the value of attribute buttons.
-
#pos ⇒ Object
Returns the value of attribute pos.
-
#rel ⇒ Object
Returns the value of attribute rel.
Instance Method Summary collapse
-
#initialize(pos, rel, buttons) ⇒ MouseMotionEvent
constructor
A new instance of MouseMotionEvent.
Constructor Details
#initialize(pos, rel, buttons) ⇒ MouseMotionEvent
Returns a new instance of MouseMotionEvent.
256 257 258 |
# File 'lib/rubygame/event.rb', line 256 def initialize(pos,rel,) @pos, @rel, @buttons = pos, rel, end |
Instance Attribute Details
#buttons ⇒ Object
Returns the value of attribute buttons.
255 256 257 |
# File 'lib/rubygame/event.rb', line 255 def @buttons end |
#pos ⇒ Object
Returns the value of attribute pos.
255 256 257 |
# File 'lib/rubygame/event.rb', line 255 def pos @pos end |
#rel ⇒ Object
Returns the value of attribute rel.
255 256 257 |
# File 'lib/rubygame/event.rb', line 255 def rel @rel end |