1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-07-15 01:24:45 +02:00

- minor tweaks to quest window

- fixed #531
- fixed query crash (empty funciton)
This commit is contained in:
Ivan Savenko
2012-07-21 20:16:54 +00:00
parent 0665850d9d
commit 13de841e10
16 changed files with 116 additions and 109 deletions

View File

@ -1273,6 +1273,24 @@ void CSDL_Ext::fillRect( SDL_Surface *dst, SDL_Rect *dstrect, Uint32 color )
SDL_FillRect(dst, &newRect, color);
}
void CSDL_Ext::fillTexture(SDL_Surface *dst, SDL_Surface * src)
{
SDL_Rect srcRect;
SDL_Rect dstRect;
SDL_GetClipRect(src, &srcRect);
SDL_GetClipRect(dst, &dstRect);
for (int y=dstRect.y; y<dstRect.h; y+=srcRect.h)
{
for (int x=dstRect.x; x<dstRect.w; x+=srcRect.w)
{
Rect currentDest(x, y, srcRect.w, srcRect.h);
SDL_BlitSurface(src, &srcRect, dst, &currentDest);
}
}
}
std::string CSDL_Ext::trimToFit(std::string text, int widthLimit, EFonts font)
{
int widthSoFar = 0;