From: Holger Schemel Date: Mon, 9 May 2022 21:52:13 +0000 (+0200) Subject: fixed using font draw offset when clearing input on name selection screen X-Git-Tag: 4.3.2.2~38 X-Git-Url: https://git.artsoft.org/?a=commitdiff_plain;h=65bc423db5f8413e8eabc6025229b0507901d646;p=rocksndiamonds.git fixed using font draw offset when clearing input on name selection screen --- diff --git a/src/screens.c b/src/screens.c index 388bde6f..df5fe472 100644 --- a/src/screens.c +++ b/src/screens.c @@ -4015,8 +4015,12 @@ static void drawTypeNameText(char *name, struct TextPosInfo *pos, int sy = (multiple_users ? amSY + pos->y : mSY + ALIGNED_TEXT_YPOS(pos)); int font_nr = (active ? FONT_ACTIVE(pos->font) : pos->font); int font_width = getFontWidth(font_nr); + int font_xoffset = getFontDrawOffsetX(font_nr); + int font_yoffset = getFontDrawOffsetY(font_nr); + int font_sx = sx + font_xoffset; + int font_sy = sy + font_yoffset; - DrawBackgroundForFont(sx, sy, pos->width, pos->height, font_nr); + DrawBackgroundForFont(font_sx, font_sy, pos->width, pos->height, font_nr); sprintf(text, "%s%c", name, (active ? '_' : '\0'));