rnd-20060212-1-src
[rocksndiamonds.git] / src / events.c
index d7d023e72c2343c953cbad089cf8049e3cb3b050..c45581e549df5f0354e4a291aad9c08d059c5b54 100644 (file)
@@ -435,6 +435,7 @@ void HandleButton(int mx, int my, int button)
       break;
 
     case GAME_MODE_EDITOR:
+      HandleLevelEditorIdle();
       break;
 
     case GAME_MODE_INFO:
@@ -681,7 +682,8 @@ void HandleKey(Key key, int key_status)
     return;
   }
 
-  if (game_status == GAME_MODE_MAIN && key == setup.shortcut.toggle_pause)
+  if (game_status == GAME_MODE_MAIN &&
+      (key == setup.shortcut.toggle_pause || key == KSYM_space))
   {
     StartGameActions(options.network, setup.autorecord, NEW_RANDOMIZE);
 
@@ -718,7 +720,12 @@ void HandleKey(Key key, int key_status)
     case GAME_MODE_INFO:
       switch(key)
       {
+#if 1
+       case KSYM_space:
+#else
+       /* !!! only use "space" key to start game from main menu !!! */
        case KSYM_space:
+#endif
        case KSYM_Return:
          if (game_status == GAME_MODE_MAIN)
            HandleMainMenu(0,0, 0,0, MB_MENU_CHOICE);
@@ -757,6 +764,12 @@ void HandleKey(Key key, int key_status)
            HandleInfoScreen(0,0, 0, +1 * SCROLL_PAGE, MB_MENU_MARK);
          break;
 
+#ifdef DEBUG
+       case KSYM_0:
+         GameFrameDelay = (GameFrameDelay == 500 ? GAME_FRAME_DELAY : 500);
+         break;
+#endif
+
        default:
          break;
       }