The different menu where we can buy things are not always the same #137

Closed
opened 2026-08-28 12:27:56 +00:00 by metaheavens · 1 comment
Owner

resources at the top are not always shown the same way, the price is not always put at the same place. don't take into account the skill tree which is different, but the build menu, the research menu, the ship crafter menu (and maybe others) would benefit from a more unified UX. Be careful, the research menu for example has sub groups so some specificities still needs to be taken in to account.

resources at the top are not always shown the same way, the price is not always put at the same place. don't take into account the skill tree which is different, but the build menu, the research menu, the ship crafter menu (and maybe others) would benefit from a more unified UX. Be careful, the research menu for example has sub groups so some specificities still needs to be taken in to account.
Author
Owner

Done in ea25318. Both halves of the ticket, and the skill tree left out of the unification as asked (its own layout is #134).

Resources at the top. The lab menu's bar ran the full width of its panel; the craft menu's stopped at a hardcoded x=520; the build menu had no resource bar at all. All three now sit at the same offsets with the same anchors, and the test compares them against each other rather than against written-down coordinates - a menu that moves is fine, a menu that moves away from the others is the bug.

One adjustment fell out of it: the bar drops its LOCAL column when there is no building to report on, which is how the build menu opens it - it is reached from the fleet's own button, not from a structure. A column of em-dashes is worth less than the width it takes from the two columns that do say something. Same reasoning as #95, which dropped it where it only repeated BANKED.

Where the price goes. There were three presentations: a NeonNumber under each build option, glyph strips under each craftable vessel (#111), and prices spelled out inside the ship lab's captions - "25 ore · 10 gas · 2 RP". PriceTag is one widget for all of them: the resource's glyph, then held-over-cost. 22 prices across the build, craft, lab and skill menus, all the same class, all under the option they describe. VesselPriceStrip - the same idea for one menu - is gone.

The lab needed the most rearranging: its captions shrink to one line and the tag takes the line the price text used to occupy, so the option block is the same height and the row below it does not move.

A trap for whoever touches this next: PriceTag and ResourceBar both read the GameState autoload, and an extends SceneTree test script that so much as names such a class - or preloads the file - fails to compile, since GameState is not an identifier in that context. GDScript then caches that failure, so the scene the test instantiates comes back with a plain Control where its resource bar should be, and the symptom looks nothing like the cause. The tests compare script paths as strings for that reason.

Done in `ea25318`. Both halves of the ticket, and the skill tree left out of the unification as asked (its own layout is #134). **Resources at the top.** The lab menu's bar ran the full width of its panel; the craft menu's stopped at a hardcoded x=520; the build menu had no resource bar at all. All three now sit at the same offsets with the same anchors, and the test compares them against *each other* rather than against written-down coordinates - a menu that moves is fine, a menu that moves away from the others is the bug. One adjustment fell out of it: the bar drops its LOCAL column when there is no building to report on, which is how the build menu opens it - it is reached from the fleet's own button, not from a structure. A column of em-dashes is worth less than the width it takes from the two columns that do say something. Same reasoning as #95, which dropped it where it only repeated BANKED. **Where the price goes.** There were three presentations: a `NeonNumber` under each build option, glyph strips under each craftable vessel (#111), and prices spelled out inside the ship lab's captions - "25 ore · 10 gas · 2 RP". `PriceTag` is one widget for all of them: the resource's glyph, then held-over-cost. 22 prices across the build, craft, lab and skill menus, all the same class, all under the option they describe. `VesselPriceStrip` - the same idea for one menu - is gone. The lab needed the most rearranging: its captions shrink to one line and the tag takes the line the price text used to occupy, so the option block is the same height and the row below it does not move. A trap for whoever touches this next: `PriceTag` and `ResourceBar` both read the `GameState` autoload, and an `extends SceneTree` test script that so much as names such a class - or preloads the file - fails to compile, since `GameState` is not an identifier in that context. GDScript then **caches** that failure, so the scene the test instantiates comes back with a plain `Control` where its resource bar should be, and the symptom looks nothing like the cause. The tests compare script paths as strings for that reason.
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#137
No description provided.