changed score info screen to use configured left and middle spacing
authorHolger Schemel <holger.schemel@virtion.de>
Sun, 3 Nov 2024 19:07:33 +0000 (20:07 +0100)
committerHolger Schemel <holger.schemel@virtion.de>
Sun, 3 Nov 2024 19:07:36 +0000 (20:07 +0100)
src/conf_gfx.c
src/main.h
src/screens.c

index e90c243ccf1395eb57fed68eb2d540e38072a512..221f7618849a8380cd7c70423857cb5971c742c8 100644 (file)
@@ -9302,6 +9302,7 @@ struct ConfigInfo image_config[] =
   { "menu.left_spacing.INFO[LEVEL]",                   "16"                            },
   { "menu.left_spacing.SETUP[INPUT]",                  "16"                            },
 
+  { "menu.middle_spacing.SCOREINFO",                   "32"                            },
   { "menu.middle_spacing.INFO[ELEMENTS]",              "16"                            },
   { "menu.middle_spacing.INFO[VERSION]",               "32"                            },
 
index 449240a4727c95bf45f643a8b03558fec509e55a..66714e6222d377e57a9465e2977b60f56bdead53 100644 (file)
@@ -3403,6 +3403,7 @@ struct MenuInfo
   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 middle_spacing[NUM_SPECIAL_GFX_ARGS];
   int middle_spacing_info[NUM_SPECIAL_GFX_INFO_ARGS];
   int right_spacing[NUM_SPECIAL_GFX_ARGS];
   int right_spacing_info[NUM_SPECIAL_GFX_INFO_ARGS];
index 57d4bb410c4d41784b2bed9cae1d5f11737d19f9..e1301c73a6df6d7c1ad2bb18339d85d09921b015 100644 (file)
@@ -5931,6 +5931,7 @@ static void DrawScoreInfo_Content(int entry_nr)
   struct ScoreEntry *entry = &scores.entry[entry_nr];
   char *pos_text = getHallOfFameRankText(entry_nr, 0);
   char *tape_date = getHallOfFameTapeDateText(entry);
+  int max_text_1_len = strlen("Level Set");
   int font_head = MENU_INFO_FONT_HEAD;
   int font_text = MENU_INFO_FONT_TEXT;
   int font_foot = MENU_INFO_FONT_FOOT;
@@ -5938,14 +5939,13 @@ static void DrawScoreInfo_Content(int entry_nr)
   int spacing_line = menu.line_spacing[GAME_MODE_SCOREINFO];
   int spacing_left = menu.left_spacing[GAME_MODE_SCOREINFO];
   int spacing_top  = menu.top_spacing[GAME_MODE_SCOREINFO];
-  int xstep = getFontWidth(font_text);
+  int spacing_midd = menu.middle_spacing[GAME_MODE_SCOREINFO];
   int ystep_para = getMenuTextStep(spacing_para,  font_text);
   int ystep_line = getMenuTextStep(spacing_line,  font_text);
-  int xstart  = mSX - SX + spacing_left;
   int ystart  = mSY - SY + spacing_top + getHeadlineSpacing();
   int yfooter = mSY - SY + MENU_FOOTER_YPOS;
-  int xstart1 = xstart + xstep;
-  int xstart2 = xstart + xstep * 12;
+  int xstart1 = mSX - SX + spacing_left;
+  int xstart2 = xstart1 + max_text_1_len * getFontWidth(font_text) + spacing_midd;
   int select_x = SX + xstart1;
   int select_y1, select_y2;
   int play_x, play_y;