hedgewars/uRenderUtils.pas
changeset 15753 72f735c03fec
parent 15092 ba9d54d1c25d
child 15852 c4561095666a
equal deleted inserted replaced
15752:f09db263bc2a 15753:72f735c03fec
   113         DrawRoundRect(@finalRect, cNearBlackColor, cWhiteColor, Surface, true);
   113         DrawRoundRect(@finalRect, cNearBlackColor, cWhiteColor, Surface, true);
   114     tmpsurf:= TTF_RenderUTF8_Blended(Fontz[Font].Handle, PChar(s), clr);
   114     tmpsurf:= TTF_RenderUTF8_Blended(Fontz[Font].Handle, PChar(s), clr);
   115     finalRect.x:= X + cFontBorder + cFontPadding;
   115     finalRect.x:= X + cFontBorder + cFontPadding;
   116     finalRect.y:= Y + cFontBorder;
   116     finalRect.y:= Y + cFontBorder;
   117     if SDLCheck(tmpsurf <> nil, 'TTF_RenderUTF8_Blended', true) then
   117     if SDLCheck(tmpsurf <> nil, 'TTF_RenderUTF8_Blended', true) then
   118         exit;
   118         exit(finalRect);
   119     SDL_UpperBlit(tmpsurf, @textRect, Surface, @finalRect);
   119     SDL_UpperBlit(tmpsurf, @textRect, Surface, @finalRect);
   120     SDL_FreeSurface(tmpsurf);
   120     SDL_FreeSurface(tmpsurf);
   121     finalRect.x:= X;
   121     finalRect.x:= X;
   122     finalRect.y:= Y;
   122     finalRect.y:= Y;
   123     finalRect.w:= w + cFontBorder * 2 + cFontPadding * 2;
   123     finalRect.w:= w + cFontBorder * 2 + cFontPadding * 2;