106 Result.h:= h + FontBorder * 2; |
106 Result.h:= h + FontBorder * 2; |
107 DrawRoundRect(@Result, cWhiteColor, cColorNearBlack, Surface); |
107 DrawRoundRect(@Result, cWhiteColor, cColorNearBlack, Surface); |
108 clr.r:= Color shr 16; |
108 clr.r:= Color shr 16; |
109 clr.g:= (Color shr 8) and $FF; |
109 clr.g:= (Color shr 8) and $FF; |
110 clr.b:= Color and $FF; |
110 clr.b:= Color and $FF; |
111 tmpsurf:= TTF_RenderUTF8_Blended(Fontz[Font].Handle, PChar(s), clr); |
111 tmpsurf:= TTF_RenderUTF8_Blended(Fontz[Font].Handle, PChar(s), clr.value); |
112 Result.x:= X + FontBorder + 2; |
112 Result.x:= X + FontBorder + 2; |
113 Result.y:= Y + FontBorder; |
113 Result.y:= Y + FontBorder; |
114 SDLTry(tmpsurf <> nil, true); |
114 SDLTry(tmpsurf <> nil, true); |
115 SDL_UpperBlit(tmpsurf, nil, Surface, @Result); |
115 SDL_UpperBlit(tmpsurf, nil, Surface, @Result); |
116 SDL_FreeSurface(tmpsurf); |
116 SDL_FreeSurface(tmpsurf); |
373 r.x:= X; |
373 r.x:= X; |
374 r.y:= Y; |
374 r.y:= Y; |
375 clr.r:= $FF; |
375 clr.r:= $FF; |
376 clr.g:= $FF; |
376 clr.g:= $FF; |
377 clr.b:= $FF; |
377 clr.b:= $FF; |
378 tmpsurf:= TTF_RenderUTF8_Solid(Fontz[Font].Handle, PChar(s), clr); |
378 tmpsurf:= TTF_RenderUTF8_Solid(Fontz[Font].Handle, PChar(s), clr.value); |
379 SDLTry(tmpsurf <> nil, true); |
379 SDLTry(tmpsurf <> nil, true); |
380 SDL_UpperBlit(tmpsurf, nil, Surface, @r); |
380 SDL_UpperBlit(tmpsurf, nil, Surface, @r); |
381 SDL_FreeSurface(tmpsurf) |
381 SDL_FreeSurface(tmpsurf) |
382 end; |
382 end; |
383 |
383 |