make selection box sub-tile aware

This commit is contained in:
2026-08-14 22:44:18 +02:00
parent 1cf7c264c1
commit a1c567715e
13 changed files with 232 additions and 125 deletions

View File

@@ -54,12 +54,11 @@ struct WorldRenderFrame
const SelectionController& selection;
const BuildModeController& buildMode;
const std::vector<ActiveBeam>& beams;
bool isBoxSelecting;
// Whether that box drag has passed the movement threshold that tells it apart
// from a click; until it has, the rectangle is not drawn (REQ-UI-MULTI-SELECT).
bool isBoxDragMoved;
QPoint boxStartTile;
QPoint boxCurrentTile;
// The box being dragged, in world coordinates and normalized, or nullopt when no
// drag is in progress — a press that has not passed the movement threshold is
// still a click and offers none (REQ-UI-MULTI-SELECT). It is the same rectangle
// the view selects by, so what is drawn and what is selected cannot disagree.
std::optional<QRectF> boxWorldRect;
bool isDebugDrawEnabled;
};