From: Holger Schemel Date: Wed, 16 Oct 2024 22:41:51 +0000 (+0200) Subject: fixed width of scrollable info text (by subtracting draw offset) X-Git-Tag: 4.4.0.0-test-4~114 X-Git-Url: https://git.artsoft.org/?a=commitdiff_plain;h=83a637fce7cf39bb066a06abe07ee7b324106d32;p=rocksndiamonds.git fixed width of scrollable info text (by subtracting draw offset) This correction currently only affects credits and program info text. --- diff --git a/src/screens.c b/src/screens.c index 2f990aa6..c0bd1a84 100644 --- a/src/screens.c +++ b/src/screens.c @@ -4144,12 +4144,14 @@ 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 line_height = font_height + line_spacing; + int draw_xoffset = mSX - SX; + int draw_yoffset = mSY - SY; - tmi->x = SXSIZE / 2; + tmi->x = (SXSIZE - draw_xoffset) / 2; tmi->y = MENU_SCREEN_INFO_YSTART + getHeadlineSpacing(); - tmi->chars = SXSIZE / font_width; + tmi->chars = (SXSIZE - draw_xoffset) / font_width; tmi->width = tmi->chars * font_width; - tmi->height = MENU_SCREEN_INFO_YBOTTOM - tmi->y - 10; + tmi->height = MENU_SCREEN_INFO_YBOTTOM - tmi->y - 10 - draw_yoffset; tmi->lines = tmi->height / line_height; tmi->align = ALIGN_CENTER; tmi->valign = VALIGN_TOP;