mirror of
https://github.com/vcmi/vcmi.git
synced 2025-06-15 00:05:02 +02:00
* more code for creature info window and upgrades (still not finished)
* minor fixes
This commit is contained in:
@ -93,6 +93,25 @@ void CSDL_Ext::printAtMiddleWB(std::string text, int x, int y, TTF_Font * font,
|
||||
}
|
||||
|
||||
|
||||
for (int i=0;i<wesu.size();i++)
|
||||
SDL_FreeSurface(wesu[i]);
|
||||
delete ws;
|
||||
}
|
||||
void CSDL_Ext::printAtWB(std::string text, int x, int y, TTF_Font * font, int charpr, SDL_Color kolor, SDL_Surface * dst)
|
||||
{
|
||||
std::vector<std::string> * ws = CMessage::breakText(text,charpr);
|
||||
std::vector<SDL_Surface*> wesu;
|
||||
wesu.resize(ws->size());
|
||||
for (int i=0;i<wesu.size();i++)
|
||||
wesu[i]=TTF_RenderText_Blended(font,(*ws)[i].c_str(),kolor);
|
||||
|
||||
int evy = y;
|
||||
for (int i=0;i<wesu.size();i++)
|
||||
{
|
||||
blitAt(wesu[i],x,evy,dst);
|
||||
evy+=wesu[i]->h;
|
||||
}
|
||||
|
||||
for (int i=0;i<wesu.size();i++)
|
||||
SDL_FreeSurface(wesu[i]);
|
||||
delete ws;
|
||||
|
Reference in New Issue
Block a user