Преглед на файлове

Pressing shift will now add tile coordinates to adventure map hover text

Ivan Savenko преди 1 година
родител
ревизия
56ee3713fe
променени са 1 файла, в които са добавени 4 реда и са изтрити 0 реда
  1. 4 0
      client/adventureMap/AdventureMapInterface.cpp

+ 4 - 0
client/adventureMap/AdventureMapInterface.cpp

@@ -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);
 	}