|
@@ -667,20 +667,20 @@ void CCastleInterface::buildingClicked(int building)
|
|
|
//TODO: case 24: //basic horde 2
|
|
|
//TODO: case 25: //upg horde 2
|
|
|
//TODO: case 26: //grail
|
|
|
- default:
|
|
|
- defaultBuildingClicked(building);
|
|
|
+ default:
|
|
|
+ defaultBuildingClicked(building);
|
|
|
break;
|
|
|
}
|
|
|
}
|
|
|
-}
|
|
|
-void CCastleInterface::defaultBuildingClicked(int building)
|
|
|
-{
|
|
|
- std::vector<SComponent*> comps(1,
|
|
|
- new CCustomImgComponent(SComponent::building,town->subID,building,bicons->ourImages[building].bitmap,false));
|
|
|
+}
|
|
|
+void CCastleInterface::defaultBuildingClicked(int building)
|
|
|
+{
|
|
|
+ std::vector<SComponent*> comps(1,
|
|
|
+ new CCustomImgComponent(SComponent::building,town->subID,building,bicons->ourImages[building].bitmap,false));
|
|
|
|
|
|
- LOCPLINT->showInfoDialog(
|
|
|
- CGI->buildh->buildings[town->subID][building]->Description(),
|
|
|
- comps, soundBase::sound_todo);
|
|
|
+ LOCPLINT->showInfoDialog(
|
|
|
+ CGI->buildh->buildings[town->subID][building]->Description(),
|
|
|
+ comps, soundBase::sound_todo);
|
|
|
}
|
|
|
|
|
|
void CCastleInterface::enterHall()
|
|
@@ -1387,7 +1387,7 @@ CHallInterface::CHallInterface(CCastleInterface * owner)
|
|
|
resdatabar->pos.x += pos.x;
|
|
|
resdatabar->pos.y += pos.y;
|
|
|
LOCPLINT->castleInt->statusbar->clear();
|
|
|
- bg = BitmapHandler::loadBitmap(CGI->buildh->hall[owner->town->subID].first);
|
|
|
+ bg = BitmapHandler::loadBitmap(CGI->buildh->hall[owner->town->subID].first);
|
|
|
bid = owner->town->hallLevel()+10;
|
|
|
graphics->blueToPlayersAdv(bg,LOCPLINT->playerID);
|
|
|
exit = new AdventureMapButton
|
|
@@ -1461,9 +1461,9 @@ void CHallInterface::close()
|
|
|
GH.popIntTotally(this);
|
|
|
}
|
|
|
void CHallInterface::show(SDL_Surface * to)
|
|
|
-{
|
|
|
- blitAt(bg,pos,to);
|
|
|
- LOCPLINT->castleInt->statusbar->show(to);
|
|
|
+{
|
|
|
+ blitAt(bg,pos,to);
|
|
|
+ LOCPLINT->castleInt->statusbar->show(to);
|
|
|
printAtMiddle(CGI->buildh->buildings[LOCPLINT->castleInt->town->subID][bid]->Name(),400+pos.x,13+pos.y,GEORXX,zwykly,to);
|
|
|
resdatabar->show(to);
|
|
|
exit->show(to);
|
|
@@ -1471,7 +1471,7 @@ void CHallInterface::show(SDL_Surface * to)
|
|
|
{
|
|
|
for(size_t j=0;j<boxes[i].size(); ++j)
|
|
|
boxes[i][j]->show(to);
|
|
|
- }
|
|
|
+ }
|
|
|
}
|
|
|
void CHallInterface::activate()
|
|
|
{
|
|
@@ -1561,12 +1561,12 @@ std::string CHallInterface::CBuildWindow::getTextForState(int state)
|
|
|
case 8:
|
|
|
{
|
|
|
ret = CGI->generaltexth->allTexts[52];
|
|
|
- std::set<int> reqs= LOCPLINT->cb->getBuildingRequiments(LOCPLINT->castleInt->town, bid);
|
|
|
-
|
|
|
+ std::set<int> reqs= LOCPLINT->cb->getBuildingRequiments(LOCPLINT->castleInt->town, bid);
|
|
|
+
|
|
|
bool first=true;
|
|
|
for(std::set<int>::iterator i=reqs.begin();i!=reqs.end();i++)
|
|
|
- {
|
|
|
- if (vstd::contains(LOCPLINT->castleInt->town->builtBuildings, *i))
|
|
|
+ {
|
|
|
+ if (vstd::contains(LOCPLINT->castleInt->town->builtBuildings, *i))
|
|
|
continue;//skipping constructed buildings
|
|
|
ret+=(((first)?(" "):(", ")) + CGI->buildh->buildings[tid][*i]->Name());
|
|
|
first = false;//TODO - currently can return "Mage guild lvl 1, MG lvl 2..." - extra check needed
|