Module: RbSDL2::Mouse::MouseButton
- Included in:
- RbSDL2::Mouse, MouseClass
- Defined in:
- lib/rb_sdl2/mouse/mouse_button.rb
Constant Summary collapse
- BUTTON =
-> (x) { 1 << x - 1 }
- BUTTON_LMASK =
BUTTON.(::SDL::BUTTON_LEFT)
- BUTTON_MMASK =
BUTTON.(::SDL::BUTTON_MIDDLE)
- BUTTON_RMASK =
BUTTON.(::SDL::BUTTON_RIGHT)
- BUTTON_X1MASK =
BUTTON.(::SDL::BUTTON_X1)
- BUTTON_X2MASK =
BUTTON.(::SDL::BUTTON_X2)
Instance Method Summary collapse
- #any_button? ⇒ Boolean
- #button?(mask) ⇒ Boolean
- #left_button? ⇒ Boolean
- #middle_button? ⇒ Boolean
- #right_button? ⇒ Boolean
- #x1_button? ⇒ Boolean
- #x2_button? ⇒ Boolean
Instance Method Details
#any_button? ⇒ Boolean
13 |
# File 'lib/rb_sdl2/mouse/mouse_button.rb', line 13 def = != 0 |
#button?(mask) ⇒ Boolean
11 |
# File 'lib/rb_sdl2/mouse/mouse_button.rb', line 11 def (mask) = mask & != 0 |
#middle_button? ⇒ Boolean
17 |
# File 'lib/rb_sdl2/mouse/mouse_button.rb', line 17 def = (BUTTON_MMASK) |
#right_button? ⇒ Boolean
19 |
# File 'lib/rb_sdl2/mouse/mouse_button.rb', line 19 def = (BUTTON_RMASK) |