Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Resize the purchase list for oversized vehicle sprites #5271

Closed
DorpsGek opened this issue Aug 11, 2012 · 1 comment
Closed

Resize the purchase list for oversized vehicle sprites #5271

DorpsGek opened this issue Aug 11, 2012 · 1 comment
Labels
flyspray This issue is imported from FlySpray (https://bugs.openttd.org/) patch from FlySpray This issue is in fact a Patch, but imported from FlySrpay

Comments

@DorpsGek
Copy link
Member

Eddi opened the ticket and wrote:

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

Attachments

Reported version: trunk
Operating system: All


This issue was imported from FlySpray: https://bugs.openttd.org/task/5271
@DorpsGek
Copy link
Member Author

michi_cc closed the ticket.

Reason for closing: Implemented

In r24839.


This comment was imported from FlySpray: https://bugs.openttd.org/task/5271

@DorpsGek DorpsGek added Core flyspray This issue is imported from FlySpray (https://bugs.openttd.org/) patch from FlySpray This issue is in fact a Patch, but imported from FlySrpay labels Apr 7, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
flyspray This issue is imported from FlySpray (https://bugs.openttd.org/) patch from FlySpray This issue is in fact a Patch, but imported from FlySrpay
Projects
None yet
Development

No branches or pull requests

1 participant