OpenTTD

Tasklist

FS#5271 - Resize the purchase list for oversized vehicle sprites

Attached to Project: OpenTTD
Opened by Johannes E. Krause (Eddi) - Saturday, 11 August 2012, 10:25 GMT
Last edited by Michael Lutz (michi_cc) - Sunday, 23 December 2012, 01:00 GMT
Type Patch
Category Core
Status Closed
Assigned To No-one
Operating System All
Severity Low
Priority Normal
Reported Version trunk
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

The width of the purchase list is currently hardcoded, leaving NewGRF authors having to resort to hacky stuff like "setx" to make room for larger sprites.

However, there is already code in place to adjust the Ship/Aircraft Depot GUI to adjust to the real size of the sprites. This patch reuses this code to also apply width/height changes to the purchase list.

The results may be suboptimal for some GRFs which already have oversized sprites (especially 2ccSet and old FISH (0.9.x)), but this patch would allow new GRFs to avoid "setx" if they provide better offsets. Partially that is because sprites are "centered" in the purchase list. If we would force left/bottom-aligning (src/build_vehicle_gui.cpp:885), some issues could be avoided. But it would be a change of style, so i did not include it in this patch.

Patch based on r24460
This task depends upon

Closed by  Michael Lutz (michi_cc)
Sunday, 23 December 2012, 01:00 GMT
Reason for closing:  Implemented
Additional comments about closing:  In r24839.

Loading...