1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-01-30 04:30:42 +02:00

* bug 1082 fixed

This commit is contained in:
mateuszb 2012-09-27 17:16:41 +00:00
parent af133ae758
commit 0b15a634f9
2 changed files with 6 additions and 3 deletions

View File

@ -29,7 +29,7 @@ CBattleConsole::~CBattleConsole()
texts.clear(); texts.clear();
} }
void CBattleConsole::show(SDL_Surface * to) void CBattleConsole::showAll(SDL_Surface * to)
{ {
if(ingcAlter.size()) if(ingcAlter.size())
{ {
@ -109,6 +109,9 @@ void CBattleConsole::scrollDown(ui32 by)
lastShown += by; lastShown += by;
} }
CBattleConsole::CBattleConsole() : lastShown(-1), alterTxt(""), whoSetAlter(0)
{}
void CBattleHero::show(SDL_Surface * to) void CBattleHero::show(SDL_Surface * to)
{ {
//animation of flag //animation of flag

View File

@ -35,9 +35,9 @@ public:
std::string alterTxt; //if it's not empty, this text is displayed std::string alterTxt; //if it's not empty, this text is displayed
std::string ingcAlter; //alternative text set by in-game console - very important! std::string ingcAlter; //alternative text set by in-game console - very important!
int whoSetAlter; //who set alter text; 0 - battle interface or none, 1 - button int whoSetAlter; //who set alter text; 0 - battle interface or none, 1 - button
CBattleConsole() : lastShown(-1), alterTxt(""), whoSetAlter(0) {} CBattleConsole();
~CBattleConsole(); //d-tor ~CBattleConsole(); //d-tor
void show(SDL_Surface * to = 0); void showAll(SDL_Surface * to = 0);
bool addText(const std::string &text); //adds text at the last position; returns false if failed (e.g. text longer than 70 characters) bool addText(const std::string &text); //adds text at the last position; returns false if failed (e.g. text longer than 70 characters)
void alterText(const std::string &text); //place string at alterTxt void alterText(const std::string &text); //place string at alterTxt
void eraseText(ui32 pos); //erases added text at position pos void eraseText(ui32 pos); //erases added text at position pos