From: Holger Schemel Date: Tue, 2 Oct 2018 13:04:31 +0000 (+0200) Subject: fixed drawing preferred network player in setup menu X-Git-Tag: 4.1.1.0~13 X-Git-Url: https://git.artsoft.org/?a=commitdiff_plain;h=a79916fee27c0264eb3a48443a9aed5fbadfa0ce;p=rocksndiamonds.git fixed drawing preferred network player in setup menu --- diff --git a/src/screens.c b/src/screens.c index 43198fa8..14bcc409 100644 --- a/src/screens.c +++ b/src/screens.c @@ -6596,10 +6596,17 @@ static void drawSetupValue(int screen_pos, int setup_info_pos_raw) if (type & TYPE_PLAYER) { + struct FontBitmapInfo *font = getFontBitmapInfo(font_nr); int player_nr = *(int *)value; - int xoff = getFontWidth(font_nr); + int xoff = font->draw_xoffset + getFontWidth(font_nr); + int yoff = font->draw_yoffset + (getFontHeight(font_nr) - TILEY) / 2; + int startx2 = startx + xoff; + int starty2 = starty + yoff; - DrawFixedGraphicThruMaskExt(drawto, startx + xoff, starty, + if (DrawingOnBackground(startx2, starty2)) + ClearRectangleOnBackground(drawto, startx2, starty2, TILEX, TILEY); + + DrawFixedGraphicThruMaskExt(drawto, startx2, starty2, PLAYER_NR_GFX(IMG_PLAYER_1, player_nr), 0); }