From 65bc423db5f8413e8eabc6025229b0507901d646 Mon Sep 17 00:00:00 2001 From: Holger Schemel Date: Mon, 9 May 2022 23:52:13 +0200 Subject: [PATCH] fixed using font draw offset when clearing input on name selection screen --- src/screens.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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')); -- 2.34.1