mirror of
https://github.com/m5stack/meshtastic-device-ui.git
synced 2026-05-20 11:51:03 -07:00
count objects
This commit is contained in:
@@ -113,8 +113,8 @@ void MapPanel::drawObject(const MapObject &obj)
|
||||
auto tileIt = tiles.find(obj.point.xTile << 16 | obj.point.yTile);
|
||||
if (tileIt != tiles.end()) {
|
||||
MapTile &tile = *tileIt->second;
|
||||
obj.draw(obj.id, tile.getX() + obj.point.xPos, tile.getY() + obj.point.yPos, MapTileSettings::getZoomLevel());
|
||||
objectsOnMap++; // FIXME: counts also objects that are clipped away
|
||||
obj.draw(obj.id, tile.getX() + obj.point.xPos, tile.getY() + obj.point.yPos, MapTileSettings::getZoomLevel());
|
||||
} else {
|
||||
obj.draw(obj.id, 0, 0, 0); // hide object
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user