From 58f6ea42ff968f8b1cffd10201ba0cc806b36f06 Mon Sep 17 00:00:00 2001 From: Holger Schemel Date: Sun, 3 Nov 2024 20:07:33 +0100 Subject: [PATCH] changed score info screen to use configured left and middle spacing --- src/conf_gfx.c | 1 + src/main.h | 1 + src/screens.c | 8 ++++---- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/src/conf_gfx.c b/src/conf_gfx.c index e90c243c..221f7618 100644 --- a/src/conf_gfx.c +++ b/src/conf_gfx.c @@ -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" }, diff --git a/src/main.h b/src/main.h index 449240a4..66714e62 100644 --- a/src/main.h +++ b/src/main.h @@ -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]; diff --git a/src/screens.c b/src/screens.c index 57d4bb41..e1301c73 100644 --- a/src/screens.c +++ b/src/screens.c @@ -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; -- 2.34.1