rnd-20020322-1-src
[rocksndiamonds.git] / src / events.c
index 79ffdd4ad02613fb5bf65e609be6ed563b87405b..fd8c35132206c56097d8a6bb099ca81ab23c972b 100644 (file)
@@ -511,9 +511,9 @@ void HandleKey(Key key, int key_status)
   }
 
   /* allow quick escape to the main menu with the Escape key */
-  if (key == KSYM_Escape && game_status != MAINMENU)
+  if (key == KSYM_Escape &&
+      game_status != MAINMENU && game_status != LEVELED)
   {
-    CloseDoor(DOOR_CLOSE_1 | DOOR_OPEN_2 | DOOR_NO_DELAY);
     game_status = MAINMENU;
     DrawMainMenu();
     return;
@@ -605,7 +605,7 @@ void HandleKey(Key key, int key_status)
       break;
 
     case LEVELED:
-      if (!anyTextGadgetActiveOrJustFinished)
+      if (!anyTextGadgetActiveOrJustFinished || key == KSYM_Escape)
        HandleLevelEditorKeyInput(key);
       break;