mirror of
https://github.com/vcmi/vcmi.git
synced 2025-06-15 00:05:02 +02:00
* Right-click info window for castles and garrisons you do not own shows a rough amount of creatures instead of none.
I don't really know under which circumstances no information at all is shown in the original H3 so I haven't dealt with that.
This commit is contained in:
@ -640,14 +640,23 @@ void CTerrainRect::clickRight(tribool down, bool previousState)
|
||||
if (garr != NULL) {
|
||||
InfoAboutTown iah;
|
||||
|
||||
iah.obj = garr;
|
||||
iah.fortLevel = 0;
|
||||
iah.army = garr->army;
|
||||
iah.name = std::string("Garrison");
|
||||
iah.name = VLC->generaltexth->names[33]; // "Garrison"
|
||||
iah.owner = garr->tempOwner;
|
||||
iah.built = false;
|
||||
iah.details = NULL; // TODO: Find a suitable way to show detailed info.
|
||||
iah.tType = NULL;
|
||||
|
||||
// Show detailed info only to owning player.
|
||||
if (garr->tempOwner == LOCPLINT->playerID) {
|
||||
iah.details = new InfoAboutTown::Details;
|
||||
iah.details->customRes = false;
|
||||
iah.details->garrisonedHero = false;
|
||||
iah.details->goldIncome = -1;
|
||||
iah.details->hallLevel = -1;
|
||||
}
|
||||
|
||||
SDL_Surface *iwin = graphics->drawTownInfoWin(iah);
|
||||
CInfoPopup * ip = new CInfoPopup(iwin,
|
||||
GH.current->motion.x - iwin->w/2,
|
||||
|
Reference in New Issue
Block a user