the ship menu build doesn't look good, prices are far from the button they are about, and when many different resources are needed the costs overlap. each resource type should go on a new line #147

Closed
opened 2026-08-28 13:53:56 +00:00 by metaheavens · 1 comment
Owner
No description provided.
Author
Owner

Done in 080e3bb. Both halves of the report turned out to be the same cause - a craft cell laid out with more slack than its row pitch had room for.

"Prices are far from the button they are about." The caption box was 62px tall for a one-line vessel name, which pushed the price 70px clear of the button it belonged to. The caption is one line now with the price directly under it.

"When many different resources are needed the costs overlap." The price was given 184px of width in a 190px column, so a two-resource price ran out of its own box and into its neighbour's.

"Each resource type should go on a new line." Done - and unconditionally, which was not my first attempt. I first made it stack only when a row would not fit, and the gas bomber promptly did not stack: two resources came to 174px in a 184px box. It fits until the player is holding three figures rather than one, and then it does not. A layout that is correct until you get rich is not correct, so more than one resource now means one per line everywhere.

While measuring I found a third fault in the same cell: the price of one row reached 14px into the button of the row below, whatever was priced - the entry was 214px tall in a 200px row pitch. Rows are placed off a measured band now rather than a written-down pair of tops, which is the same fix #144 needed for the build menu, and is now literally the same code. A centre-anchored grid under a top-anchored header has a gap between them equal to half the panel height, so it can never be a constant.

The test pins what you described rather than the numbers behind it: a multi-resource price is stacked, its content stays inside its own box, it sits within 80px of its button, and no craft entry overlaps another.

Done in `080e3bb`. Both halves of the report turned out to be the same cause - a craft cell laid out with more slack than its row pitch had room for. **"Prices are far from the button they are about."** The caption box was 62px tall for a one-line vessel name, which pushed the price 70px clear of the button it belonged to. The caption is one line now with the price directly under it. **"When many different resources are needed the costs overlap."** The price was given 184px of width in a 190px column, so a two-resource price ran out of its own box and into its neighbour's. **"Each resource type should go on a new line."** Done - and unconditionally, which was not my first attempt. I first made it stack only when a row would not fit, and the gas bomber promptly did not stack: two resources came to 174px in a 184px box. It fits *until the player is holding three figures rather than one*, and then it does not. A layout that is correct until you get rich is not correct, so more than one resource now means one per line everywhere. While measuring I found a third fault in the same cell: the price of one row reached 14px into the button of the row below, whatever was priced - the entry was 214px tall in a 200px row pitch. Rows are placed off a **measured band** now rather than a written-down pair of tops, which is the same fix #144 needed for the build menu, and is now literally the same code. A centre-anchored grid under a top-anchored header has a gap between them equal to half the panel height, so it can never be a constant. The test pins what you described rather than the numbers behind it: a multi-resource price is stacked, its content stays inside its own box, it sits within 80px of its button, and no craft entry overlaps another.
Sign in to join this conversation.
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
metaheavens/spaceship#147
No description provided.