Multi-select ships/stations, mixable with scrap

Reshape game-world selection into two categories: buildings (exclusive,
win all ties) and field objects (ships, defence stations, scrap) that
coexist. Ships/stations are now multi-selectable via Ctrl+click and
box-drag and can be selected together with scrap; the Selected panel
shows a single-actor stats panel or a multi-actor summary plus the scrap
total.

- Widen EntitySelectedEvent to std::vector<entt::entity>
- Add actorsInBox() ECS query (+ Catch2 test)
- GameWorldView: vector actor selection, building>actor>scrap hit-test,
  actor Ctrl-toggle/box-select, membership highlights, per-frame prune
- SelectedBuildingPanel: buildFieldSelection composition, buildEntitySummary
- ArenaView/InspectWindow: adapt to vector payload (single-select)

Implements REQ-UI-SELECTION-CATEGORIES, REQ-UI-FIELD-MULTI-SELECTION and
the updated entity/scrap selection requirements.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Y7N59FsLA5e2kuVdqe4Uhc
This commit is contained in:
2026-07-20 20:23:09 +02:00
parent 3ebaa48cc5
commit 4044846d6a
10 changed files with 445 additions and 163 deletions

View File

@@ -19,3 +19,10 @@ entt::entity scrapAtWorldPos(EntityAdmin& admin, QVector2D worldPos);
// Returns every scrap pile whose position falls within the inclusive tile rectangle
// spanned by tileA and tileB, in any corner order (REQ-UI-SCRAP-MULTI-SELECT).
std::vector<entt::entity> scrapInBox(EntityAdmin& admin, QPoint tileA, QPoint tileB);
// Returns every living actor (ship or defence station, player or enemy) that falls
// within the inclusive tile rectangle spanned by tileA and tileB, in any corner order
// (REQ-UI-MULTI-SELECT, REQ-UI-ENTITY-CLICK-SELECT). A ship is included when its floored
// position tile lies in the box; a station is included when any of its body cells does.
// Dead actors (hp <= 0) and the HQ proxy are excluded.
std::vector<entt::entity> actorsInBox(EntityAdmin& admin, QPoint tileA, QPoint tileB);