set default position for snapshot buttons (for old level set compatibility)
authorHolger Schemel <info@artsoft.org>
Tue, 2 Jun 2015 07:26:15 +0000 (09:26 +0200)
committerHolger Schemel <info@artsoft.org>
Tue, 2 Jun 2015 07:26:15 +0000 (09:26 +0200)
src/conf_gfx.c
src/files.c

index 44eafc75419d54bbc5346b5696c962b67a18858a..3bf86692669a6b71d04c64cf7efd096d73e6a729 100644 (file)
@@ -7380,16 +7380,16 @@ struct ConfigInfo image_config[] =
   { "game.button.pause.y",                     "215"                   },
   { "game.button.play.x",                      "65"                    },
   { "game.button.play.y",                      "215"                   },
   { "game.button.pause.y",                     "215"                   },
   { "game.button.play.x",                      "65"                    },
   { "game.button.play.y",                      "215"                   },
-  { "game.button.undo.x",                      "5"                     },
-  { "game.button.undo.y",                      "215"                   },
-  { "game.button.redo.x",                      "65"                    },
-  { "game.button.redo.y",                      "215"                   },
-  { "game.button.save.x",                      "5"                     },
-  { "game.button.save.y",                      "215"                   },
-  { "game.button.pause2.x",                    "35"                    },
-  { "game.button.pause2.y",                    "215"                   },
-  { "game.button.load.x",                      "65"                    },
-  { "game.button.load.y",                      "215"                   },
+  { "game.button.undo.x",                      "-1"                    },
+  { "game.button.undo.y",                      "-1"                    },
+  { "game.button.redo.x",                      "-1"                    },
+  { "game.button.redo.y",                      "-1"                    },
+  { "game.button.save.x",                      "-1"                    },
+  { "game.button.save.y",                      "-1"                    },
+  { "game.button.pause2.x",                    "-1"                    },
+  { "game.button.pause2.y",                    "-1"                    },
+  { "game.button.load.x",                      "-1"                    },
+  { "game.button.load.y",                      "-1"                    },
   { "game.button.sound_music.x",               "5"                     },
   { "game.button.sound_music.y",               "245"                   },
   { "game.button.sound_loops.x",               "35"                    },
   { "game.button.sound_music.x",               "5"                     },
   { "game.button.sound_music.y",               "245"                   },
   { "game.button.sound_loops.x",               "35"                    },
index 47e26ffa6707a6e57a6433589209bba86ce6586d..9704cdfd5b294f1a7296522fac3ca6e9f8b6f999 100644 (file)
@@ -8788,9 +8788,36 @@ static void InitMenuDesignSettings_SpecialPreProcessing()
 
 static void InitMenuDesignSettings_SpecialPostProcessing()
 {
 
 static void InitMenuDesignSettings_SpecialPostProcessing()
 {
+  static struct
+  {
+    struct XY *dst, *src;
+  }
+  game_buttons_xy[] =
+  {
+    { &game.button.save,       &game.button.stop       },
+    { &game.button.pause2,     &game.button.pause      },
+    { &game.button.load,       &game.button.play       },
+    { &game.button.undo,       &game.button.stop       },
+    { &game.button.redo,       &game.button.play       },
+
+    { NULL,                    NULL                    }
+  };
+  int i;
+
   /* special case: initialize later added SETUP list size from LEVELS value */
   if (menu.list_size[GAME_MODE_SETUP] == -1)
     menu.list_size[GAME_MODE_SETUP] = menu.list_size[GAME_MODE_LEVELS];
   /* special case: initialize later added SETUP list size from LEVELS value */
   if (menu.list_size[GAME_MODE_SETUP] == -1)
     menu.list_size[GAME_MODE_SETUP] = menu.list_size[GAME_MODE_LEVELS];
+
+  /* set default position for snapshot buttons to stop/pause/play buttons */
+  for (i = 0; game_buttons_xy[i].dst != NULL; i++)
+  {
+    if ((*game_buttons_xy[i].dst).x == -1 &&
+       (*game_buttons_xy[i].dst).y == -1)
+    {
+      (*game_buttons_xy[i].dst).x = (*game_buttons_xy[i].src).x;
+      (*game_buttons_xy[i].dst).y = (*game_buttons_xy[i].src).y;
+    }
+  }
 }
 
 static void LoadMenuDesignSettingsFromFilename(char *filename)
 }
 
 static void LoadMenuDesignSettingsFromFilename(char *filename)