From: Holger Schemel Date: Mon, 14 Oct 2024 23:49:35 +0000 (+0200) Subject: fixed text height calculation for credits pages X-Git-Tag: 4.4.0.0-test-4~122 X-Git-Url: https://git.artsoft.org/?a=commitdiff_plain;h=a5bd3bb93a05eee0a25fedf46f0aa0b5dcdc683b;p=rocksndiamonds.git fixed text height calculation for credits pages --- diff --git a/src/screens.c b/src/screens.c index 66e3a0f7..c342b220 100644 --- a/src/screens.c +++ b/src/screens.c @@ -4114,12 +4114,13 @@ static void DrawInfoScreen_GenericScreen(int screen_nr, int num_screens, int use int font_width = getFontWidth(font_text); int font_height = getFontHeight(font_text); int width = SXSIZE; - int height = MENU_SCREEN_INFO_YBOTTOM - MENU_SCREEN_INFO_YSTART; int chars = width / font_width; - int lines = height / font_height; - int line_spacing = getMenuTextSpacing(spacing_line, font_text); int x = (width - chars * font_width) / 2; int y = MENU_SCREEN_INFO_YSTART + getHeadlineSpacing(); + int height = MENU_SCREEN_INFO_YBOTTOM - y - 10; + int line_spacing = getMenuTextSpacing(spacing_line, font_text); + int line_height = font_height + line_spacing; + int lines = height / line_height; boolean autowrap = FALSE; boolean centered = TRUE; boolean parse_comments = TRUE;