Added mouse position for button handling
authorSam Lantinga <slouken@libsdl.org>
Sat, 12 Dec 2009 00:08:02 +0000
changeset 35456d91cff0ec79
parent 3544 71189305cd33
child 3546 65848493e08e
Added mouse position for button handling
test/testwm.c
     1.1 --- a/test/testwm.c	Sat Dec 12 00:07:26 2009 +0000
     1.2 +++ b/test/testwm.c	Sat Dec 12 00:08:02 2009 +0000
     1.3 @@ -214,9 +214,10 @@
     1.4              visible = !visible;
     1.5              SDL_ShowCursor(visible);
     1.6          }
     1.7 -        printf("Mouse button %d has been %s\n",
     1.8 +        printf("Mouse button %d has been %s at %d,%d\n",
     1.9                 event->button.button,
    1.10 -               (event->button.state == SDL_PRESSED) ? "pressed" : "released");
    1.11 +               (event->button.state == SDL_PRESSED) ? "pressed" : "released",
    1.12 +               event->button.x, event->button.y);
    1.13          return (0);
    1.14  
    1.15          /* Show relative mouse motion */