From 5f6b3d3a5fff50a3ec916038be776ffc64dfeb2d Mon Sep 17 00:00:00 2001 From: Holger Schemel Date: Mon, 28 Oct 2024 20:12:36 +0100 Subject: [PATCH] added using line spacing also for level and level set info text --- src/screens.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/screens.c b/src/screens.c index 4fd73c38..800fe682 100644 --- a/src/screens.c +++ b/src/screens.c @@ -4166,10 +4166,10 @@ static void DrawInfoScreen_GenericScreen(int screen_nr, int num_screens, int use font_text = (info_mode == INFO_MODE_LEVEL && tmi->font == FONT_INFO_LEVELSET ? FONT_INFO_LEVEL : tmi->font); - line_spacing = 0; int font_width = getFontWidth(font_text); int font_height = getFontHeight(font_text); + int line_height = font_height + line_spacing; // if x position set to "-1", automatically determine by playfield width if (tmi->x == -1) @@ -4193,11 +4193,11 @@ static void DrawInfoScreen_GenericScreen(int screen_nr, int num_screens, int use else tmi->width = tmi->chars * font_width; - // if lines set to "-1", automatically determine by text and font height + // if lines set to "-1", automatically determine by text and line height if (tmi->lines == -1) - tmi->lines = tmi->height / font_height; + tmi->lines = tmi->height / line_height; else - tmi->height = tmi->lines * font_height; + tmi->height = tmi->lines * line_height; } FreeWrappedText(wrapped_text); -- 2.34.1