mirror of
https://github.com/vcmi/vcmi.git
synced 2025-11-25 22:42:04 +02:00
Cleaned up code of Minimap
This commit is contained in:
@@ -82,13 +82,11 @@ void CQuestMinimap::addQuestMarks (const QuestInfo * q)
|
||||
else
|
||||
tile = q->tile;
|
||||
|
||||
int x,y;
|
||||
minimap->tileToPixels (tile, x, y);
|
||||
Point offset = tileToPixels(tile);
|
||||
|
||||
if (level != tile.z)
|
||||
setLevel(tile.z);
|
||||
setLevel(tile.z);
|
||||
|
||||
auto pic = std::make_shared<CQuestIcon>("VwSymbol.def", 3, x, y);
|
||||
auto pic = std::make_shared<CQuestIcon>("VwSymbol.def", 3, offset.x, offset.y);
|
||||
|
||||
pic->moveBy (Point ( -pic->pos.w/2, -pic->pos.h/2));
|
||||
pic->callback = std::bind (&CQuestMinimap::iconClicked, this);
|
||||
|
||||
Reference in New Issue
Block a user