- x = int(x * float(SCREEN_WIDTH)/screen->w);
- y = int(y * float(SCREEN_HEIGHT)/screen->h);
-
- w = cursor->w / tot_frames;
- h = cursor->h / MC_STATES_NB;
- if(ispressed &SDL_BUTTON(1) || ispressed &SDL_BUTTON(2))
- {
- if(cur_state != MC_CLICK)
- {
- state_before_click = cur_state;
- cur_state = MC_CLICK;
- }
- }
- else
- {
- if(cur_state == MC_CLICK)
- cur_state = state_before_click;
- }