diff --git a/docs/requirements.md b/docs/requirements.md index 1f2ade1..a64e268 100644 --- a/docs/requirements.md +++ b/docs/requirements.md @@ -311,7 +311,7 @@ Any ship, module, building, or assembler recipe id that appears in no unlock gro The dialog contains: - **Top**: The ship's layout grid rendered at full scale. Buildable cells are white; non-buildable cells are black. Placed modules are rendered with their `fill_color` and `glyph`. The ghost of the currently selected module is shown at the cursor position when in placement mode. - **Left** (below the grid): The ship stats panel (see REQ-MOD-UI-STATS-PANEL), and beneath it the layout's **build cost**, so the price of a configuration is visible while it is being assembled rather than only once it has been confirmed: the total materials required for the ship — the union of the schematic's base materials and those of every placed module, summed per item type (REQ-MOD-MATERIALS) — drawn as item icons on their colored squares with their amounts (REQ-UI-ITEM-ICON), and beside them the total production time (REQ-MOD-PRODUCTION-TIME). Both update in real time as modules are placed and removed. The cost sits beside the stats panel rather than within it because a build cost belongs to a ship being configured: the same panel serves an existing ship (REQ-UI-SHIP-STATS-PANEL) and the balancing tool, neither of which costs anything. - - **Center** (below the grid): A grid of module selection buttons (one per **unlocked** module type; see REQ-DEF-SCHEMATIC-DROP) plus a "Remove" button. A module button shows the module's name — its `id` under the usual display convention — and its glyph on its first line, and beneath it what the module costs: the icons of its `materials` items on their colored squares with their amounts (REQ-UI-ITEM-ICON) and the production time it adds, as `+ s` (REQ-MOD-MATERIALS, REQ-MOD-PRODUCTION-TIME). This is the same form a recipe option button uses to state what it makes (REQ-UI-SELECT-OPTIONS), and it puts the price of a module in front of the player before it is placed. The "Remove" button costs nothing and shows its caption alone. + - **Center** (below the grid): A grid of module selection buttons (one per **unlocked** module type; see REQ-DEF-SCHEMATIC-DROP) plus a "Remove" button. A module button shows the module's name — its `id` under the usual display convention — on its first line, and beneath it what the module costs: the icons of its `materials` items on their colored squares with their amounts (REQ-UI-ITEM-ICON) and the production time it adds, as `+ s` (REQ-MOD-MATERIALS, REQ-MOD-PRODUCTION-TIME). This is the same form a recipe option button uses to state what it makes (REQ-UI-SELECT-OPTIONS), and it puts the price of a module in front of the player before it is placed. The "Remove" button costs nothing and shows its caption alone. - **Right** (below the grid): The layout blueprint panel (see REQ-MOD-UI-BLUEPRINT-PANEL through REQ-MOD-UI-BLUEPRINT-FILE-LOAD). - **Bottom**: A "Confirm" button and a "Cancel" button. Cancel discards all changes made in this dialog session and closes the dialog. Confirm applies the changes: the shipyard's configured layout is updated, the required materials and cycle time displayed in the selection panel are recalculated, and the ship layout preview is refreshed. diff --git a/src/ui/ShipLayoutDialog.cpp b/src/ui/ShipLayoutDialog.cpp index 7653ee1..caf9b9a 100644 --- a/src/ui/ShipLayoutDialog.cpp +++ b/src/ui/ShipLayoutDialog.cpp @@ -518,9 +518,10 @@ ShipLayoutDialog::ShipLayoutDialog(const GameConfig* config, m_moduleButtons.push_back(nullptr); continue; } - // The module's name and glyph over what it costs -- its materials and the - // production time it adds (REQ-MOD-UI-DIALOG). Both children are transparent to - // the mouse so a click anywhere on the face still reaches the button. + // The module's name over what it costs -- its materials and the production time + // it adds (REQ-MOD-UI-DIALOG). The glyph is how a module is identified on the + // layout grid, not here. Both children are transparent to the mouse so a click + // anywhere on the face still reaches the button. OptionButton* btn = new OptionButton(this); btn->setCheckable(true); @@ -528,9 +529,8 @@ ShipLayoutDialog::ShipLayoutDialog(const GameConfig* config, face->setContentsMargins(8, 4, 8, 4); face->setSpacing(1); - QLabel* nameLabel = new QLabel( - QString::fromStdString(toDisplayName(def.id)) - + " " + QString::fromStdString(def.glyph), btn); + QLabel* nameLabel = + new QLabel(QString::fromStdString(toDisplayName(def.id)), btn); nameLabel->setAttribute(Qt::WA_TransparentForMouseEvents, true); face->addWidget(nameLabel);