projects
/
rocksndiamonds.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
b247bff
)
fixed using font draw offset when clearing input on name selection screen
author
Holger Schemel
<info@artsoft.org>
Mon, 9 May 2022 21:52:13 +0000
(23:52 +0200)
committer
Holger Schemel
<info@artsoft.org>
Mon, 9 May 2022 21:52:13 +0000
(23:52 +0200)
src/screens.c
patch
|
blob
|
history
diff --git
a/src/screens.c
b/src/screens.c
index 388bde6f744e24b273aa8a5e90f233ea16425a29..df5fe4722f3751340a8053bc50a5be9189d9a306 100644
(file)
--- 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 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'));
sprintf(text, "%s%c", name, (active ? '_' : '\0'));