added centering levels that are smaller than the playfield (MM engine)
[rocksndiamonds.git] / src / screens.c
index 3eff48ed7c0cc40789d074ed428e6a969d522c24..e20f4deb67a8fe729b207733fdf6dfc5d83ad83b 100644 (file)
@@ -421,6 +421,7 @@ static struct
   char *text;
 } touch_controls_list[] =
 {
+  {    TOUCH_CONTROL_OFF,              "Off"                   },
   {    TOUCH_CONTROL_VIRTUAL_BUTTONS,  "Virtual Buttons"       },
   {    TOUCH_CONTROL_WIPE_GESTURES,    "Wipe Gestures"         },
   {    TOUCH_CONTROL_FOLLOW_FINGER,    "Follow Finger"         },
@@ -999,8 +1000,6 @@ static boolean visibleTextPos(struct TextPosInfo *pos)
 
 static void InitializeMainControls()
 {
-  TreeInfo *graphics_current =
-    getArtworkTreeInfoForUserLevelSet(ARTWORK_TYPE_GRAPHICS);
   boolean local_team_mode = (!options.network && setup.team_mode);
   int i;
 
@@ -1019,21 +1018,9 @@ static void InitializeMainControls()
   main_text_level_imported_by  = leveldir_current->imported_by;
   main_text_level_tested_by    = leveldir_current->tested_by;
 
-  main_text_title_1 = (leveldir_current->program_title ?
-                      leveldir_current->program_title :
-                      graphics_current->program_title ?
-                      graphics_current->program_title :
-                      setup.internal.program_title);
-  main_text_title_2 = (leveldir_current->program_copyright ?
-                      leveldir_current->program_copyright :
-                      graphics_current->program_copyright ?
-                      graphics_current->program_copyright :
-                      setup.internal.program_copyright);
-  main_text_title_3 = (leveldir_current->program_company ?
-                      leveldir_current->program_company :
-                      graphics_current->program_company ?
-                      graphics_current->program_company :
-                      setup.internal.program_company);
+  main_text_title_1 = getConfigProgramTitleString();
+  main_text_title_2 = getConfigProgramCopyrightString();
+  main_text_title_3 = getConfigProgramCompanyString();
 
   /* set main control screen positions to dynamically determined values */
   for (i = 0; main_controls[i].nr != -1; i++)
@@ -1343,9 +1330,8 @@ static void drawChooseTreeCursor(int ypos, boolean active)
 
 void DrawHeadline()
 {
-  DrawTextSCentered(MENU_TITLE1_YPOS, FONT_TITLE_1, getProgramTitleString());
-  DrawTextSCentered(MENU_TITLE2_YPOS, FONT_TITLE_2,
-                   setup.internal.program_copyright);
+  DrawTextSCentered(MENU_TITLE1_YPOS, FONT_TITLE_1, main_text_title_1);
+  DrawTextSCentered(MENU_TITLE2_YPOS, FONT_TITLE_2, main_text_title_2);
 }
 
 void DrawTitleScreenImage(int nr, boolean initial)
@@ -7105,6 +7091,9 @@ void HandleSetupScreen(int mx, int my, int dx, int dy, int button)
 
 void HandleGameActions()
 {
+  if (game.restart_game_message != NULL)
+    RequestRestartGame(game.restart_game_message);
+
   if (game_status != GAME_MODE_PLAYING)
     return;