mirror of
https://github.com/vcmi/vcmi.git
synced 2025-02-17 13:41:07 +02:00
Pressing shift will now add tile coordinates to adventure map hover text
This commit is contained in:
parent
16c7063eb4
commit
56ee3713fe
@ -643,11 +643,15 @@ void AdventureMapInterface::onTileHovered(const int3 &targetPosition)
|
||||
objRelations = LOCPLINT->cb->getPlayerRelations(LOCPLINT->playerID, objAtTile->tempOwner);
|
||||
std::string text = LOCPLINT->localState->getCurrentHero() ? objAtTile->getHoverText(LOCPLINT->localState->getCurrentHero()) : objAtTile->getHoverText(LOCPLINT->playerID);
|
||||
boost::replace_all(text,"\n"," ");
|
||||
if (GH.isKeyboardShiftDown())
|
||||
text.append(" (" + std::to_string(targetPosition.x) + ", " + std::to_string(targetPosition.y) + ")");
|
||||
GH.statusbar()->write(text);
|
||||
}
|
||||
else if(isTargetPositionVisible)
|
||||
{
|
||||
std::string tileTooltipText = CGI->mh->getTerrainDescr(targetPosition, false);
|
||||
if (GH.isKeyboardShiftDown())
|
||||
tileTooltipText.append(" (" + std::to_string(targetPosition.x) + ", " + std::to_string(targetPosition.y) + ")");
|
||||
GH.statusbar()->write(tileTooltipText);
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user