Add demolish box-drag interaction

This commit is contained in:
2026-07-08 21:04:59 +02:00
parent 808e0c6a7b
commit f11db0c072
3 changed files with 84 additions and 47 deletions

View File

@@ -143,6 +143,9 @@ private:
const BuildingDef* findBuildingDef(BuildingType type) const;
BuildingId buildingAtTile(QPoint tile) const;
BuildingId siteAtTile(QPoint tile) const;
// Ids of all buildings and construction sites whose footprint intersects
// the tile box spanned by the two (unordered) corner tiles.
std::vector<BuildingId> buildingsInBox(QPoint cornerA, QPoint cornerB) const;
QVector2D widgetToWorld(QPoint widgetPt) const;
void drawPortGlyph(QPainter& painter, QPoint bodyTile,