Module: SDL::Mouse
- Defined in:
- ext/sdl/sdl.c
Class Method Summary collapse
-
.state ⇒ Object
// SDL::Mouse methods:.
Class Method Details
.state ⇒ Object
// SDL::Mouse methods:
342 343 344 345 346 347 348 349 350 351 352 353 354 |
# File 'ext/sdl/sdl.c', line 342
static VALUE Mouse_s_state(VALUE mod) {
UNUSED(mod);
int x,y;
Uint8 result = SDL_GetMouseState(&x, &y);
return rb_ary_new3(5,
INT2FIX(x),
INT2FIX(y),
INT2BOOL(result&SDL_BUTTON_LMASK),
INT2BOOL(result&SDL_BUTTON_MMASK),
INT2BOOL(result&SDL_BUTTON_RMASK));
}
|