News:

Do you need help?
Simutrans Wiki Manual can help you to play and extend Simutrans. In 9 languages.

[patch] Fix image resizing problem in builders

Started by knightly, January 06, 2010, 05:57:09 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

knightly

Currently, the builders (factory builder, curiosity builders, etc.) show images which scale with the current zoom factor of the main view. Sometimes the image enlarges beyond the window's bottom boundary, and sometimes the image becomes broken (split into 4 pieces) when shrunk to a small size.

The attached patch fixes this problem by changing gui_image_t::zeichnen() to use display_base_img() instead of display_color_img(), the latter of which will always show images in rezoomed scale, while the former will not.

I have checked that all code blocks which use gui_image_t need not (like small icons) or should not (like station layout dialog) use a scaled image. Besides, IMHO images for the GUI should not scale with main view's zoom factor.

I have also fixed some alignment issues in the builder dialogs so that they now look more tidy. The width of the tab panel will be automatically adjusted so that, for paksets with larger tile width, the image will still have sufficient width to render under the tab panel.