Class: RbSDL2::Mouse::RelativeMouse
- Inherits:
-
MouseClass
- Object
- MouseClass
- RbSDL2::Mouse::RelativeMouse
- Includes:
- Singleton
- Defined in:
- lib/rb_sdl2/mouse/relative_mouse.rb
Constant Summary
Constants included from MouseButton
MouseButton::BUTTON, MouseButton::BUTTON_LMASK, MouseButton::BUTTON_MMASK, MouseButton::BUTTON_RMASK, MouseButton::BUTTON_X1MASK, MouseButton::BUTTON_X2MASK
Instance Attribute Summary
Attributes inherited from MouseClass
Class Method Summary collapse
Instance Method Summary collapse
Methods inherited from MouseClass
#initialize, #position, #position=
Methods included from MouseButton
#any_button?, #button?, #left_button?, #middle_button?, #right_button?, #x1_button?, #x2_button?
Constructor Details
This class inherits a constructor from RbSDL2::Mouse::MouseClass
Class Method Details
.update ⇒ Object
13 14 15 16 17 |
# File 'lib/rb_sdl2/mouse/relative_mouse.rb', line 13 def update self., self.x, self.y = ::SDL.GetRelativeMouseState(@_x, @_y), @_x.read_int, @_y.read_int self end |
Instance Method Details
#update ⇒ Object
20 21 22 23 |
# File 'lib/rb_sdl2/mouse/relative_mouse.rb', line 20 def update self.class.update self end |