Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- int quit = 0;
- SDL_ShowCursor(1);
- while (!quit)
- {
- while (SDL_PollEvent(&event))
- {
- switch(event.type)
- {
- case SDL_MOUSEBUTTONDOWN:
- cout<<event.button.button<<endl;
- if (event.button.button == SDL_BUTTON_LEFT and event.button.state == SDL_PRESSED )
- {
- action(event.button.x, event.button.y );
- update_interface(ekran);
- }
- break;
- case SDL_KEYDOWN:
- quit = 1;
- break;
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment