From: Holger Schemel Date: Mon, 28 Oct 2024 19:12:36 +0000 (+0100) Subject: added using line spacing also for level and level set info text X-Git-Tag: 4.4.0.0-test-4~109 X-Git-Url: https://git.artsoft.org/?a=commitdiff_plain;h=5f6b3d3a5fff50a3ec916038be776ffc64dfeb2d;p=rocksndiamonds.git added using line spacing also for level and level set info text --- 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);