Recipes were explained in prose: the recipe selection dialog was a grid of
icon-only buttons whose hover tooltip listed the recipe name, its inputs,
its time and its output, and the unlock-choice dialog listed recipe names
with the same tooltip. The player had to hover every option to learn what
it made, and an item in a buffer said nothing about where it came from.
Retires REQ-UI-RECIPE-ICON and REQ-UI-SELECT-TOOLTIP, whose behavior is
gone, and adds:
* REQ-UI-SELECT-OPTIONS -- the selection dialog is a vertical column of
buttons, each showing the recipe name (or ship display name) over that
recipe drawn as the recipe summary line draws it. No tooltips: the
button face is the whole description.
* REQ-UI-ITEM-TOOLTIP -- hovering an item chip in the selection panel
shows the item's name, "Produced by", and one line per unlocked recipe
producing it, each with the running building's icon, the recipe name and
its summary. Scrap reads "Salvaged from debris"; an item whose every
recipe is locked reads "Undiscovered".
The unlock-choice dialog's "Unlocks recipes" list uses the same recipe
line and loses its tooltip too (REQ-DEF-SCHEMATIC-DROP), and the layout
configuration dialog gains the same treatment for modules: a module button
states its material cost and added production time, and the stats panel
shows the configured layout's running total (REQ-MOD-UI-DIALOG,
REQ-MOD-UI-STATS-PANEL).
Drops recipes.toml's optional "icon" field, whose only consumer was the
icon-only option button and which no shipped recipe sets.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Ne3mejABZoLWKLh8fgpM3x
Implements REQ-UI-PANEL-MODAL. The recipe/schematic selection dialog and
the ship layout configuration dialog are both opened from controls inside
the selection panel, but Qt centered them on the game window, sending the
cursor back across the view and then back again.
MainWindow::placeOnSelectionPanel() centers a dialog on the panel's live
global rectangle -- so a dragged panel carries the modal with it -- and
clamps it into the window without resizing it, clamping the far edge
before the near one so a dialog too large for the window lands on the
window's top-left corner. It is called on the constructed dialog before
exec(), which also stops QDialog from re-centering it on show.
Placement is all that changes: modality, the auto-pause, the modal dim and
dismissal are untouched, as are the modals not opened from the panel.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Ne3mejABZoLWKLh8fgpM3x
Adds REQ-UI-PANEL-MODAL: a modal opened from a control inside the
selection panel is centered on the panel's current rectangle instead of
on the game window, so the cursor does not have to travel back across
the view and return. Covers the two modals the panel opens -- the
recipe/schematic selection dialog and the layout configuration dialog,
including its auto-open after a schematic change.
Fixes the placement to the panel's rectangle as it currently stands, so
a dragged panel carries the modal with it; clamps the modal inside the
game window without resizing it; leaves modality, auto-pause, the modal
dim and dismissal untouched; and excludes every modal not opened from
the panel, including one opened from another modal.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Ne3mejABZoLWKLh8fgpM3x
Item icons were drawn bare in the panels and dialogs while only the game
world composed them onto the item's visuals.toml square, so the same item
read differently on a belt than in a panel.
Move the composition into ItemIconCache, which now holds the visuals and
offers it in two forms: paintItem() for the world's fractional geometry
and getSquarePixmap() for widgets. WorldRenderer::drawWorldItem collapses
onto the former, and the recipe-selection dialog, the selection panel's
item chips and the recipe summary onto the latter. The inset fraction
that shapes the composition now has one definition instead of two.
An item with no icon file now shows its square alone rather than falling
back to text, so callers gate on the composed pixmap being null -- the
case of an item with neither square nor icon -- instead of on hasIcon().
The inline building_block icon beside a number keeps using the bare
getPixmap() and takes no square.
The chip and summary squares are drawn a few pixels larger than the icons
were, so the artwork keeps its size once the square insets it. Reloading
the visuals on a restart drops the composed pixmaps, which carry the
colors they were painted with (REQ-CFG-RELOAD).
REQ-UI-ITEM-ICON, REQ-UI-RECIPE-ICON, REQ-UI-SINGLE-SELECTION,
REQ-UI-RECIPE-SUMMARY, REQ-UI-HQ-PANEL
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Ne3mejABZoLWKLh8fgpM3x
Item icons shown in the UI panels and dialogs were drawn bare; only the
game world composed them onto the item colored square. Extend the square
to every place the UI displays an item as an item: the recipe-selection
dialog option buttons, the selection panel item chips, and the recipe
summary. The inline building_block icon standing in for the word "Blocks"
beside a number stays bare, being a text decoration rather than an item
display.
REQ-UI-ITEM-ICON, REQ-UI-RECIPE-ICON, REQ-UI-SINGLE-SELECTION,
REQ-UI-RECIPE-SUMMARY, REQ-UI-HQ-PANEL
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Ne3mejABZoLWKLh8fgpM3x