1
0
mirror of https://github.com/vcmi/vcmi.git synced 2024-11-28 08:48:48 +02:00

Recrutation -> Recruitment.

This commit is contained in:
Frank Zago 2009-05-12 03:43:40 +00:00
parent 788343dd1d
commit 51216c224d
4 changed files with 22 additions and 22 deletions

View File

@ -886,7 +886,7 @@ void CCastleInterface::recreateBuildings()
}
}
CRecrutationWindow * CCastleInterface::showRecruitmentWindow( int building )
CRecruitmentWindow * CCastleInterface::showRecruitmentWindow( int building )
{
if(building>36)
building-=7;
@ -898,7 +898,7 @@ CRecrutationWindow * CCastleInterface::showRecruitmentWindow( int building )
crs.push_back(std::make_pair(town->town->basicCreatures[building-30],amount));
CRecrutationWindow *rw = new CRecrutationWindow(crs,boost::bind(&CCallback::recruitCreatures,LOCPLINT->cb,town,_1,_2));
CRecruitmentWindow *rw = new CRecruitmentWindow(crs,boost::bind(&CCallback::recruitCreatures,LOCPLINT->cb,town,_1,_2));
LOCPLINT->pushInt(rw);
return rw;
}

View File

@ -96,7 +96,7 @@ public:
void showAll(SDL_Surface * to);
void buildingClicked(int building);
void enterMageGuild();
CRecrutationWindow * showRecruitmentWindow(int building);
CRecruitmentWindow * showRecruitmentWindow(int building);
void enterHall();
void close();
void splitF();

View File

@ -3399,28 +3399,28 @@ SDL_Surface * CCreaturePic::getPic(bool nextFrame)
//TODO: write
return NULL;
}
void CRecrutationWindow::close()
void CRecruitmentWindow::close()
{
LOCPLINT->popIntTotally(this);
}
void CRecrutationWindow::Max()
void CRecruitmentWindow::Max()
{
slider->moveTo(slider->amount);
}
void CRecrutationWindow::Buy()
void CRecruitmentWindow::Buy()
{
recruit(creatures[which].ID,slider->value);
close();
}
void CRecrutationWindow::Cancel()
void CRecruitmentWindow::Cancel()
{
close();
}
void CRecrutationWindow::sliderMoved(int to)
void CRecruitmentWindow::sliderMoved(int to)
{
buy->block(!to);
}
void CRecrutationWindow::clickLeft(tribool down)
void CRecruitmentWindow::clickLeft(tribool down)
{
int curx = 192 + 51 - (102*creatures.size()/2) - (18*(creatures.size()-1)/2);
for(int i=0;i<creatures.size();i++)
@ -3448,7 +3448,7 @@ void CRecrutationWindow::clickLeft(tribool down)
curx += 120;
}
}
void CRecrutationWindow::clickRight( boost::logic::tribool down )
void CRecruitmentWindow::clickRight( boost::logic::tribool down )
{
if(down)
{
@ -3466,7 +3466,7 @@ void CRecrutationWindow::clickRight( boost::logic::tribool down )
}
}
void CRecrutationWindow::activate()
void CRecruitmentWindow::activate()
{
ClickableL::activate();
ClickableR::activate();
@ -3477,7 +3477,7 @@ void CRecrutationWindow::activate()
LOCPLINT->statusbar = bar;
}
void CRecrutationWindow::deactivate()
void CRecruitmentWindow::deactivate()
{
ClickableL::deactivate();
ClickableR::deactivate();
@ -3487,7 +3487,7 @@ void CRecrutationWindow::deactivate()
slider->deactivate();
}
void CRecrutationWindow::show(SDL_Surface * to)
void CRecruitmentWindow::show(SDL_Surface * to)
{
static char animCounter=0; //animation counter - for determining appropriate animation frame to be shown
blitAt(bitmap,pos.x,pos.y,to);
@ -3526,7 +3526,7 @@ void CRecrutationWindow::show(SDL_Surface * to)
bar->show(to);
}
CRecrutationWindow::CRecrutationWindow(const std::vector<std::pair<int,int> > &Creatures, const boost::function<void(int,int)> &Recruit) //creatures - pairs<creature_ID,amount>
CRecruitmentWindow::CRecruitmentWindow(const std::vector<std::pair<int,int> > &Creatures, const boost::function<void(int,int)> &Recruit) //creatures - pairs<creature_ID,amount>
:recruit(Recruit), which(0)
{
creatures.resize(Creatures.size());
@ -3551,10 +3551,10 @@ CRecrutationWindow::CRecrutationWindow(const std::vector<std::pair<int,int> > &C
pos.w = bitmap->w;
pos.h = bitmap->h;
bar = new CStatusBar(pos.x+8, pos.y+370, "APHLFTRT.bmp", 471);
max = new AdventureMapButton(CGI->generaltexth->zelp[553],boost::bind(&CRecrutationWindow::Max,this),pos.x+134,pos.y+313,"IRCBTNS.DEF",SDLK_m);
buy = new AdventureMapButton(CGI->generaltexth->zelp[554],boost::bind(&CRecrutationWindow::Buy,this),pos.x+212,pos.y+313,"IBY6432.DEF",SDLK_RETURN);
cancel = new AdventureMapButton(CGI->generaltexth->zelp[555],boost::bind(&CRecrutationWindow::Cancel,this),pos.x+290,pos.y+313,"ICN6432.DEF",SDLK_ESCAPE);
slider = new CSlider(pos.x+176,pos.y+279,135,boost::bind(&CRecrutationWindow::sliderMoved,this, _1),1,std::min(amounts[0],creatures[0].amount),0,true);
max = new AdventureMapButton(CGI->generaltexth->zelp[553],boost::bind(&CRecruitmentWindow::Max,this),pos.x+134,pos.y+313,"IRCBTNS.DEF",SDLK_m);
buy = new AdventureMapButton(CGI->generaltexth->zelp[554],boost::bind(&CRecruitmentWindow::Buy,this),pos.x+212,pos.y+313,"IBY6432.DEF",SDLK_RETURN);
cancel = new AdventureMapButton(CGI->generaltexth->zelp[555],boost::bind(&CRecruitmentWindow::Cancel,this),pos.x+290,pos.y+313,"ICN6432.DEF",SDLK_ESCAPE);
slider = new CSlider(pos.x+176,pos.y+279,135,boost::bind(&CRecruitmentWindow::sliderMoved,this, _1),1,std::min(amounts[0],creatures[0].amount),0,true);
std::string pom;
printAtMiddle(CGI->generaltexth->allTexts[346],113,231,GEOR13,zwykly,bitmap); //cost per troop t
printAtMiddle(CGI->generaltexth->allTexts[465],205,231,GEOR13,zwykly,bitmap); //available t
@ -3591,7 +3591,7 @@ CRecrutationWindow::CRecrutationWindow(const std::vector<std::pair<int,int> > &C
//buy->block(true); //not needed, will be blocked by initing slider on 0
}
CRecrutationWindow::~CRecrutationWindow()
CRecruitmentWindow::~CRecruitmentWindow()
{
for(int i=0;i<creatures.size();i++)
{

View File

@ -745,7 +745,7 @@ public:
SDL_Surface * getPic(bool nextFrame); //returns frame of animation
};
class CRecrutationWindow : public IShowActivable, public ClickableL, public ClickableR
class CRecruitmentWindow : public IShowActivable, public ClickableL, public ClickableR
{
public:
struct creinfo
@ -774,8 +774,8 @@ public:
void activate();
void deactivate();
void show(SDL_Surface * to);
CRecrutationWindow(const std::vector<std::pair<int,int> > & Creatures, const boost::function<void(int,int)> & Recruit); //creatures - pairs<creature_ID,amount> //c-tor
~CRecrutationWindow(); //d-tor
CRecruitmentWindow(const std::vector<std::pair<int,int> > & Creatures, const boost::function<void(int,int)> & Recruit); //creatures - pairs<creature_ID,amount> //c-tor
~CRecruitmentWindow(); //d-tor
};
class CSplitWindow : public IShowActivable, public KeyInterested, public ClickableL