diff --git a/src/chat.c b/src/chat.c index 95be462..5ab4457 100644 --- a/src/chat.c +++ b/src/chat.c @@ -67,12 +67,12 @@ chat_drawbox () src.x = chat.window.x + 2; src.y = chat.window.y + 2; src.w = src.x + chat.window.w - 4; - src.h = src.y + chat.window.h - 4 - 16; + src.h = src.y + chat.window.h - 4 - font[0].size.y; draw_shadefield (gfx.screen, &src, CHAT_BG_SHADE_DARK); src.x = chat.window.x + 2; src.y = chat.window.y + chat.window.h - 18; src.w = src.x + chat.window.w - 4; - src.h = src.y + 16; + src.h = src.y + font[0].size.y; draw_shadefield (gfx.screen, &src, CHAT_BG_SHADE_DARK >> 1); gfx_AddUpdateRect (chat.window.x, chat.window.y, chat.window.w, chat.window.h); }; @@ -144,7 +144,7 @@ chat_clearscreen (signed char all) dest.x = chat.window.x + 2; dest.y = chat.window.y + chat.window.h - 18; dest.w = src.w = chat.window.w - 4; - dest.h = src.h = 16; + dest.h = src.h = font[0].size.y; src.x = 2; src.y = chat.window.h - 18; @@ -153,14 +153,14 @@ chat_clearscreen (signed char all) if (all == 1) { dest.w = dest.x + chat.window.w - 4; - dest.h = dest.y + chat.window.h - 4 - 16; + dest.h = dest.y + chat.window.h - 4 - font[0].size.y; draw_shadefield (gfx.screen, &dest, CHAT_BG_SHADE_DARK); } src.x = chat.window.x + 2; src.y = chat.window.y + chat.window.h - 18; src.w = src.x + chat.window.w - 4; - src.h = src.y + 16; + src.h = src.y + font[0].size.y; draw_shadefield (gfx.screen, &src, CHAT_BG_SHADE_DARK >> 1); gfx_AddUpdateRect (chat.window.x, chat.window.y, chat.window.w, chat.window.h); @@ -192,8 +192,9 @@ chat_loop (SDL_Event * event) /* draw the new field */ chat_clearscreen (chat.lineschanged); p1 = p2 = 0; - maxchar = (chat.window.w - 4) / (font[0].size.x - 4); + maxchar = (chat.window.w - 4) / font[0].size.x; if (chat.lineschanged) { + font_setcolor (255,255,255,0); y = chat.window.y + 4; l = chat.startline; while (y < (chat.window.y + chat.window.h - 32) && chat.lines[l][0] != 0) {