diff --git a/client/BattleInterface/CBattleInterfaceClasses.cpp b/client/BattleInterface/CBattleInterfaceClasses.cpp index 994950fef..b8da810b2 100644 --- a/client/BattleInterface/CBattleInterfaceClasses.cpp +++ b/client/BattleInterface/CBattleInterfaceClasses.cpp @@ -29,7 +29,7 @@ CBattleConsole::~CBattleConsole() texts.clear(); } -void CBattleConsole::show(SDL_Surface * to) +void CBattleConsole::showAll(SDL_Surface * to) { if(ingcAlter.size()) { @@ -109,6 +109,9 @@ void CBattleConsole::scrollDown(ui32 by) lastShown += by; } +CBattleConsole::CBattleConsole() : lastShown(-1), alterTxt(""), whoSetAlter(0) +{} + void CBattleHero::show(SDL_Surface * to) { //animation of flag diff --git a/client/BattleInterface/CBattleInterfaceClasses.h b/client/BattleInterface/CBattleInterfaceClasses.h index a9d5798de..12feccb49 100644 --- a/client/BattleInterface/CBattleInterfaceClasses.h +++ b/client/BattleInterface/CBattleInterfaceClasses.h @@ -35,9 +35,9 @@ public: std::string alterTxt; //if it's not empty, this text is displayed 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 - CBattleConsole() : lastShown(-1), alterTxt(""), whoSetAlter(0) {} + CBattleConsole(); ~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) void alterText(const std::string &text); //place string at alterTxt void eraseText(ui32 pos); //erases added text at position pos