added option to disable warning about read-only levels when entering editor
[rocksndiamonds.git] / src / screens.c
index ee53e0bff80341528592124d4d84a82899bf5500..d596e2674eaa13c9ce9265d0b6562b4b04cc9b51 100644 (file)
@@ -2168,8 +2168,8 @@ void HandleMainMenu(int mx, int my, int dx, int dy, int button)
       else if (pos == MAIN_CONTROL_EDITOR)
       {
        if (leveldir_current->readonly &&
-           !strEqual(setup.player_name, "Artsoft"))
-         Request("This level is read only!", REQ_CONFIRM);
+           setup.editor.show_read_only_warning)
+         Request("This level is read-only!", REQ_CONFIRM);
 
        CloseDoor(DOOR_CLOSE_2);
 
@@ -4258,15 +4258,13 @@ static void HandleTypeNameExt(boolean initialize, Key key)
 
     name[xpos] = 0;
   }
-  else if (key == KSYM_Return)
+  else if (key == KSYM_Return || key == KSYM_Escape)
   {
-    setTypeNameValues(name, pos, TRUE);
+    boolean changed = (key == KSYM_Return);
 
-    active = FALSE;
-  }
-  else if (key == KSYM_Escape)
-  {
-    setTypeNameValues(name, pos, FALSE);
+    StopTextInput();
+
+    setTypeNameValues(name, pos, changed);
 
     active = FALSE;
   }
@@ -4275,8 +4273,6 @@ static void HandleTypeNameExt(boolean initialize, Key key)
 
   if (!active)
   {
-    StopTextInput();
-
     SetGameStatus(game_status_last_screen);
 
     if (game_status == GAME_MODE_MAIN)
@@ -6694,6 +6690,7 @@ static struct TokenInfo setup_info_engines[] =
   { TYPE_SWITCH,       &setup.forced_scroll_delay, "Scroll Delay:"     },
   { TYPE_ECS_AGA,      &setup.prefer_aga_graphics, "Amiga Graphics Chipset:" },
   { TYPE_SWITCH,       &setup.prefer_lowpass_sounds,"Low-Pass Filter Sounds:" },
+  { TYPE_SWITCH,       &setup.prefer_extra_panel_items,"Show Dynamite and Keys:" },
   { TYPE_EMPTY,                NULL,                   ""                      },
   { TYPE_HEADLINE,     NULL,                   "Supaplex"              },
   { TYPE_SWITCH,       &setup.sp_show_border_elements, "Border Elements:" },
@@ -6732,6 +6729,8 @@ static struct TokenInfo setup_info_editor[] =
 #endif
   { TYPE_SWITCH, &setup.editor.show_element_token,     "Show element token:" },
   { TYPE_EMPTY,                NULL,                   ""                      },
+  { TYPE_SWITCH, &setup.editor.show_read_only_warning, "Show read-only warning:" },
+  { TYPE_EMPTY,                NULL,                   ""                      },
   { TYPE_LEAVE_MENU,   execSetupMain,          "Back"                  },
 
   { 0,                 NULL,                   NULL                    }