test/testhittesting.c
changeset 8936 59cbb9959346
parent 8935 9d2f0236322b
child 8939 caaa7653f02b
equal deleted inserted replaced
8935:9d2f0236322b 8936:59cbb9959346
    16 hitTest(SDL_Window *window, const SDL_Point *pt, void *data)
    16 hitTest(SDL_Window *window, const SDL_Point *pt, void *data)
    17 {
    17 {
    18     int i;
    18     int i;
    19     for (i = 0; i < numareas; i++) {
    19     for (i = 0; i < numareas; i++) {
    20         if (SDL_PointInRect(pt, &areas[i])) {
    20         if (SDL_PointInRect(pt, &areas[i])) {
       
    21             printf("HIT-TEST: DRAGGABLE\n");
    21             return SDL_HITTEST_DRAGGABLE;
    22             return SDL_HITTEST_DRAGGABLE;
    22         }
    23         }
    23     }
    24     }
    24 
    25 
       
    26     printf("HIT-TEST: NORMAL\n");
    25     return SDL_HITTEST_NORMAL;
    27     return SDL_HITTEST_NORMAL;
    26 }
    28 }
    27 
    29 
    28 
    30 
    29 int main(int argc, char **argv)
    31 int main(int argc, char **argv)