daily pastebin goal
64%
SHARE
TWEET

Untitled

a guest Dec 11th, 2013 39 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. void Intro::handle_events() {
  2.         SDL_Event event;
  3.         while(SDL_PollEvent(&event)) {
  4.                 if(event.type == SDL_QUIT)   //If you want to exit the program, click the X on the window.
  5.                         global::vars.curState = STATE_EXIT;
  6.                 else if(event.type == SDL_KEYDOWN)
  7.                         global::vars.videostate = STATE_FADEOUT;
  8.  
  9.                 else if(event.type == SDL_JOYBUTTONDOWN) {
  10.                         if(event.jbutton.which == global::vars.gamepad)  //global::vars.gamepad is an SDL_JoystickID
  11.                                 global::vars.videostate = STATE_FADEOUT;
  12.                 }
  13.                        
  14.         }
  15. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top