fernandoReyna

Untitled

Jun 10th, 2015
258
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.33 KB | None | 0 0
  1. #include <spl/gevents.h>
  2.  
  3. #include <spl/gwindow.h>
  4.  
  5. int main(void)
  6. {
  7.   GWindow window = newGWindow(600,400);
  8.  
  9.   while(true)
  10.   {
  11.   GEvent event = getNextEvent(MOUSE_EVENT);
  12.   if(event != NULL)
  13.    {
  14.     if(getEventType(event)== MOUSE_CLICKED)
  15.     {
  16.      printf("%.0f,%.0f\n",getX(event), getY(event));
  17.     }
  18.    }
  19.   }
Advertisement
Add Comment
Please, Sign In to add comment