The different menu where we can buy things are not always the same #137
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
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.
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
NeonNumberunder 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".PriceTagis 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:
PriceTagandResourceBarboth read theGameStateautoload, and anextends SceneTreetest script that so much as names such a class - or preloads the file - fails to compile, sinceGameStateis not an identifier in that context. GDScript then caches that failure, so the scene the test instantiates comes back with a plainControlwhere its resource bar should be, and the symptom looks nothing like the cause. The tests compare script paths as strings for that reason.