mirror of
https://github.com/vcmi/vcmi.git
synced 2025-12-11 23:48:19 +02:00
Info map for terrain type. Fixes bug 5.
This commit is contained in:
@@ -568,8 +568,18 @@ void CTerrainRect::clickRight(tribool down, bool previousState)
|
||||
}
|
||||
|
||||
std::vector < const CGObjectInstance * > objs = LOCPLINT->cb->getBlockingObjs(mp);
|
||||
if(!objs.size())
|
||||
if(!objs.size()) {
|
||||
// Bare or undiscovered terrain
|
||||
if (down) {
|
||||
const TerrainTile * tile = LOCPLINT->cb->getTileInfo(mp);
|
||||
if (tile) {
|
||||
CSimpleWindow * temp = CMessage::genWindow(VLC->generaltexth->terrainNames[tile->tertype],LOCPLINT->playerID,true);
|
||||
CRClickPopupInt *rcpi = new CRClickPopupInt(temp,true);
|
||||
GH.pushInt(rcpi);
|
||||
}
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
const CGObjectInstance * obj = objs.back();
|
||||
switch(obj->ID)
|
||||
|
||||
Reference in New Issue
Block a user