added configuration options for menu title text positions
authorHolger Schemel <holger.schemel@virtion.de>
Sun, 3 Nov 2024 08:33:02 +0000 (09:33 +0100)
committerHolger Schemel <holger.schemel@virtion.de>
Sun, 3 Nov 2024 08:33:58 +0000 (09:33 +0100)
src/conf_gfx.c
src/main.h
src/screens.c

index 885f915142c776f0b5eb2d8aa9ba7819241ce772..1db6da648382c6353145d9b9d9cb548209d37abf 100644 (file)
@@ -9393,6 +9393,17 @@ struct ConfigInfo image_config[] =
   { "menu.extra_spacing.INFO[LEVEL]",                  "2"                             },
   { "menu.extra_spacing.SETUP[INPUT]",                 "2"                             },
 
+  { "menu.text.title_1.x",                             "-1"                            },
+  { "menu.text.title_1.y",                             "8"                             },
+  { "menu.text.title_1.align",                         "center"                        },
+  { "menu.text.title_1.valign",                                "top"                           },
+  { "menu.text.title_1.font",                          "font.title_1"                  },
+  { "menu.text.title_2.x",                             "-1"                            },
+  { "menu.text.title_2.y",                             "46"                            },
+  { "menu.text.title_2.align",                         "center"                        },
+  { "menu.text.title_2.valign",                                "top"                           },
+  { "menu.text.title_2.font",                          "font.title_2"                  },
+
   { "main.button.name.x",                              "0"                             },
   { "main.button.name.y",                              "64"                            },
   { "main.button.levels.x",                            "0"                             },
index 7eb0e47f8e6623f6e1963b6350f99d3787af42f8..9ca6638ec5644e7ebae8739481649505c92fdb06 100644 (file)
@@ -3241,6 +3241,12 @@ struct RequestButtonInfo
   struct TextPosInfo touch_confirm;
 };
 
+struct MenuTextInfo
+{
+  struct TextPosInfo title_1;
+  struct TextPosInfo title_2;
+};
+
 struct MenuMainButtonInfo
 {
   struct MenuPosInfo name;
@@ -3431,6 +3437,7 @@ struct MenuInfo
   int sound[NUM_SPECIAL_GFX_ARGS];
   int music[NUM_SPECIAL_GFX_ARGS];
 
+  struct MenuTextInfo text;
   struct MenuMainInfo main;
   struct MenuSetupInfo setup;
   struct MenuScoresInfo scores;
index 39b748da134e0342e8ec89c19a9ad2078d520a6d..0eb40b42f42c8b8ca9c51bf338e8f6bf439a554a 100644 (file)
 #define MENU_SCREEN_VALUE_XPOS                 (SCR_FIELDX - 3)
 #define MENU_SCREEN_TEXT2_XPOS                 (SCR_FIELDX - 2)
 #define MENU_SCREEN_MAX_XPOS                   (SCR_FIELDX - 1)
-#define MENU_TITLE1_YPOS                       8
-#define MENU_TITLE2_YPOS                       46
+#define MENU_TITLE1_YPOS                       (menu.text.title_1.y)
+#define MENU_TITLE2_YPOS                       (menu.text.title_2.y)
 #define MENU_INFO_FONT_TITLE                   FONT_TEXT_1
 #define MENU_INFO_FONT_HEAD                    FONT_TEXT_2
 #define MENU_INFO_FONT_TEXT                    FONT_TEXT_3