more kinds of menu_event are handled directly in the menu-code now.
[supertux.git] / src / title.cpp
index d41c35d..c1bda33 100644 (file)
@@ -134,6 +134,7 @@ int title(void)
 
       while (SDL_PollEvent(&event))
         {
+       menu_event(event);
           if (event.type == SDL_QUIT)
             {
               /* Quit event - quit: */
@@ -146,7 +147,7 @@ int title(void)
               key = event.key.keysym.sym;
 
               /* Check for menu events */
-              menu_event(&event.key.keysym);
+              //menu_event(event);
 
               if (key == SDLK_ESCAPE)
                 {
@@ -155,18 +156,6 @@ int title(void)
                   quit = 1;
                 }
             }
-          else if (event.type == SDL_JOYAXISMOTION && event.jaxis.axis == JOY_Y)
-            {
-              if (event.jaxis.value > 1024)
-                menuaction = MENU_ACTION_DOWN;
-              else if (event.jaxis.value < -1024)
-                menuaction = MENU_ACTION_UP;
-            }
-          else if (event.type == SDL_JOYBUTTONDOWN)
-            {
-              /* Joystick button: Continue: */
-              menuaction = MENU_ACTION_HIT;
-            }
         }
 
       /* Draw the background: */