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:
@ -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, ¤tDest);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
std::string CSDL_Ext::trimToFit(std::string text, int widthLimit, EFonts font)
|
||||
{
|
||||
int widthSoFar = 0;
|
||||
|
Reference in New Issue
Block a user