added options for left/right/top/bottom spacing for the info screens
authorHolger Schemel <info@artsoft.org>
Sun, 25 Mar 2018 11:03:21 +0000 (13:03 +0200)
committerHolger Schemel <info@artsoft.org>
Sun, 25 Mar 2018 11:06:04 +0000 (13:06 +0200)
src/conf_gfx.c
src/files.c
src/main.h

index 2cff9f1f0afac02e8abd187ad9a09feb42dcd63e..4e1b54ba0d9ab884eb0ad7928bc634f2b1d13f13 100644 (file)
@@ -7775,6 +7775,46 @@ struct ConfigInfo image_config[] =
   { "menu.list_size.INFO[ELEMENTS]",           "-1"                    },
   { "menu.list_size.SETUP",                    "-1"                    },
 
+  { "menu.left_spacing.INFO",                  "16"                    },
+  { "menu.left_spacing.INFO[TITLE]",           "16"                    },
+  { "menu.left_spacing.INFO[ELEMENTS]",                "16"                    },
+  { "menu.left_spacing.INFO[MUSIC]",           "16"                    },
+  { "menu.left_spacing.INFO[CREDITS]",         "16"                    },
+  { "menu.left_spacing.INFO[PROGRAM]",         "16"                    },
+  { "menu.left_spacing.INFO[VERSION]",         "16"                    },
+  { "menu.left_spacing.INFO[LEVELSET]",                "16"                    },
+  { "menu.left_spacing.SETUP[INPUT]",          "16"                    },
+
+  { "menu.right_spacing.INFO",                 "16"                    },
+  { "menu.right_spacing.INFO[TITLE]",          "16"                    },
+  { "menu.right_spacing.INFO[ELEMENTS]",       "16"                    },
+  { "menu.right_spacing.INFO[MUSIC]",          "16"                    },
+  { "menu.right_spacing.INFO[CREDITS]",                "16"                    },
+  { "menu.right_spacing.INFO[PROGRAM]",                "16"                    },
+  { "menu.right_spacing.INFO[VERSION]",                "16"                    },
+  { "menu.right_spacing.INFO[LEVELSET]",       "16"                    },
+  { "menu.right_spacing.SETUP[INPUT]",         "16"                    },
+
+  { "menu.top_spacing.INFO",                   "100"                   },
+  { "menu.top_spacing.INFO[TITLE]",            "100"                   },
+  { "menu.top_spacing.INFO[ELEMENTS]",         "100"                   },
+  { "menu.top_spacing.INFO[MUSIC]",            "100"                   },
+  { "menu.top_spacing.INFO[CREDITS]",          "100"                   },
+  { "menu.top_spacing.INFO[PROGRAM]",          "100"                   },
+  { "menu.top_spacing.INFO[VERSION]",          "100"                   },
+  { "menu.top_spacing.INFO[LEVELSET]",         "100"                   },
+  { "menu.top_spacing.SETUP[INPUT]",           "100"                   },
+
+  { "menu.bottom_spacing.INFO",                        "20"                    },
+  { "menu.bottom_spacing.INFO[TITLE]",         "20"                    },
+  { "menu.bottom_spacing.INFO[ELEMENTS]",      "20"                    },
+  { "menu.bottom_spacing.INFO[MUSIC]",         "20"                    },
+  { "menu.bottom_spacing.INFO[CREDITS]",       "20"                    },
+  { "menu.bottom_spacing.INFO[PROGRAM]",       "20"                    },
+  { "menu.bottom_spacing.INFO[VERSION]",       "20"                    },
+  { "menu.bottom_spacing.INFO[LEVELSET]",      "20"                    },
+  { "menu.bottom_spacing.SETUP[INPUT]",                "20"                    },
+
   { "menu.paragraph_spacing.INFO",             "-3"                    },
   { "menu.paragraph_spacing.INFO[TITLE]",      "-3"                    },
   { "menu.paragraph_spacing.INFO[ELEMENTS]",   "-3"                    },
index 497d12c87f8941ee063762c3dda96738adad977c..c8cd45eade80078539e0b279bbc61aaadcfb272d 100644 (file)
@@ -9763,22 +9763,34 @@ static void LoadMenuDesignSettingsFromFilename(char *filename)
   /* (eg, init "menu.line_spacing.INFO[XXX]" from "menu.line_spacing.INFO") */
   for (i = 0; i < NUM_SPECIAL_GFX_INFO_ARGS; i++)
   {
-    char *value_1 = getHashEntry(setup_file_hash,"menu.paragraph_spacing.INFO");
-    char *value_2 = getHashEntry(setup_file_hash,"menu.headline1_spacing.INFO");
-    char *value_3 = getHashEntry(setup_file_hash,"menu.headline2_spacing.INFO");
-    char *value_4 = getHashEntry(setup_file_hash,"menu.line_spacing.INFO");
-    char *value_5 = getHashEntry(setup_file_hash,"menu.extra_spacing.INFO");
+    char *value_1 = getHashEntry(setup_file_hash,"menu.left_spacing.INFO");
+    char *value_2 = getHashEntry(setup_file_hash,"menu.right_spacing.INFO");
+    char *value_3 = getHashEntry(setup_file_hash,"menu.top_spacing.INFO");
+    char *value_4 = getHashEntry(setup_file_hash,"menu.bottom_spacing.INFO");
+    char *value_5 = getHashEntry(setup_file_hash,"menu.paragraph_spacing.INFO");
+    char *value_6 = getHashEntry(setup_file_hash,"menu.headline1_spacing.INFO");
+    char *value_7 = getHashEntry(setup_file_hash,"menu.headline2_spacing.INFO");
+    char *value_8 = getHashEntry(setup_file_hash,"menu.line_spacing.INFO");
+    char *value_9 = getHashEntry(setup_file_hash,"menu.extra_spacing.INFO");
 
     if (value_1 != NULL)
-      menu.paragraph_spacing_info[i] = get_integer_from_string(value_1);
+      menu.left_spacing_info[i]      = get_integer_from_string(value_1);
     if (value_2 != NULL)
-      menu.headline1_spacing_info[i] = get_integer_from_string(value_2);
+      menu.right_spacing_info[i]     = get_integer_from_string(value_2);
     if (value_3 != NULL)
-      menu.headline2_spacing_info[i] = get_integer_from_string(value_3);
+      menu.top_spacing_info[i]       = get_integer_from_string(value_3);
     if (value_4 != NULL)
-      menu.line_spacing_info[i] = get_integer_from_string(value_4);
+      menu.bottom_spacing_info[i]    = get_integer_from_string(value_4);
     if (value_5 != NULL)
-      menu.extra_spacing_info[i] = get_integer_from_string(value_5);
+      menu.paragraph_spacing_info[i] = get_integer_from_string(value_5);
+    if (value_6 != NULL)
+      menu.headline1_spacing_info[i] = get_integer_from_string(value_6);
+    if (value_7 != NULL)
+      menu.headline2_spacing_info[i] = get_integer_from_string(value_7);
+    if (value_8 != NULL)
+      menu.line_spacing_info[i]      = get_integer_from_string(value_8);
+    if (value_9 != NULL)
+      menu.extra_spacing_info[i]     = get_integer_from_string(value_9);
   }
 
   /* special case: initialize with default values that may be overwritten */
index c4607c6a325951ab070d690b466b1cd68d1123f1..25771003b8f855029a0c54eb4d8bd4a483d41e1e 100644 (file)
@@ -2721,6 +2721,19 @@ struct MenuInfo
   int list_size[NUM_SPECIAL_GFX_ARGS];
   int list_size_info[NUM_SPECIAL_GFX_INFO_ARGS];
 
+  int left_spacing[NUM_SPECIAL_GFX_ARGS];
+  int left_spacing_info[NUM_SPECIAL_GFX_INFO_ARGS];
+  int left_spacing_setup[NUM_SPECIAL_GFX_SETUP_ARGS];
+  int right_spacing[NUM_SPECIAL_GFX_ARGS];
+  int right_spacing_info[NUM_SPECIAL_GFX_INFO_ARGS];
+  int right_spacing_setup[NUM_SPECIAL_GFX_SETUP_ARGS];
+  int top_spacing[NUM_SPECIAL_GFX_ARGS];
+  int top_spacing_info[NUM_SPECIAL_GFX_INFO_ARGS];
+  int top_spacing_setup[NUM_SPECIAL_GFX_SETUP_ARGS];
+  int bottom_spacing[NUM_SPECIAL_GFX_ARGS];
+  int bottom_spacing_info[NUM_SPECIAL_GFX_INFO_ARGS];
+  int bottom_spacing_setup[NUM_SPECIAL_GFX_SETUP_ARGS];
+
   int paragraph_spacing[NUM_SPECIAL_GFX_ARGS];
   int paragraph_spacing_info[NUM_SPECIAL_GFX_INFO_ARGS];
   int paragraph_spacing_setup[NUM_SPECIAL_GFX_SETUP_ARGS];