mirror of
https://github.com/yawut/SDL.git
synced 2026-09-08 00:56:24 -05:00
Added mouse position for button handling
This commit is contained in:
@@ -214,9 +214,10 @@ FilterEvents(void *userdata, SDL_Event * event)
|
||||
visible = !visible;
|
||||
SDL_ShowCursor(visible);
|
||||
}
|
||||
printf("Mouse button %d has been %s\n",
|
||||
printf("Mouse button %d has been %s at %d,%d\n",
|
||||
event->button.button,
|
||||
(event->button.state == SDL_PRESSED) ? "pressed" : "released");
|
||||
(event->button.state == SDL_PRESSED) ? "pressed" : "released",
|
||||
event->button.x, event->button.y);
|
||||
return (0);
|
||||
|
||||
/* Show relative mouse motion */
|
||||
|
||||
Reference in New Issue
Block a user