mirror of
https://github.com/vcmi/vcmi.git
synced 2025-07-15 01:24:45 +02:00
Refactoring of hoverText from objects:
- removed hoverText field - split getHoverText() method into 3: - - getObjectName() for generic name - - getHoverText(Player) for player-specific text - - getHoverText(Hero) for hero-specific strings
This commit is contained in:
@ -1234,10 +1234,9 @@ void CAdvMapInt::tileHovered(const int3 &mapPos)
|
||||
}
|
||||
const CGObjectInstance *objAtTile = getBlockingObject(mapPos);
|
||||
|
||||
//std::vector<std::string> temp = LOCPLINT->cb->getObjDescriptions(mapPos);
|
||||
if (objAtTile)
|
||||
{
|
||||
std::string text = objAtTile->getHoverText();
|
||||
std::string text = curHero() ? objAtTile->getHoverText(curHero()) : objAtTile->getHoverText(LOCPLINT->playerID);
|
||||
boost::replace_all(text,"\n"," ");
|
||||
statusbar.setText(text);
|
||||
}
|
||||
|
Reference in New Issue
Block a user