The International Simutrans Forum

Development => Bug Reports => Topic started by: The Hood on January 25, 2014, 10:16:39 AM

Title: Small buttons
Post by: The Hood on January 25, 2014, 10:16:39 AM
(http://imagizer.imageshack.us/v2/800x600q90/42/09kw.jpg) (https://imageshack.com/i/1609kwj)


See above - some buttons are now very small - I've not changed the pak files for these buttons in ages and they've always worked... r7038
Title: Re: Small buttons
Post by: Václav on January 25, 2014, 10:26:43 AM
The Hood, this is a bit older.
I found it in 7028.

But it is real game bug.

I found this when I one of my addons for pak96.comic did this - but I could not find reason.
DAT file is right.

And it is not issue of only buildings.
In Pak96.comic it is also on line manager button.

Strange is, that it is only on few buttons.
Title: Re: Small buttons
Post by: Dwachs on January 25, 2014, 11:07:42 AM
Do these icons change size with zoom in/out?
Title: Re: Small buttons
Post by: The Hood on January 25, 2014, 11:11:00 AM
No, but the very small one in the boat toolbar does flicker up at normal size (and sometimes larger) for a moment when zooming but then returns to the small size you see here.
Title: Re: Small buttons
Post by: Dwachs on January 25, 2014, 11:16:24 AM
Maybe these graphics are slightly larger than the pakset's standard icon size? Then they get resized now.
Title: Re: Small buttons
Post by: The Hood on January 25, 2014, 11:30:28 AM
They are all 32x32 - which is the correct icon size for pak128.Britain.
Title: Re: Small buttons
Post by: Václav on January 25, 2014, 02:41:38 PM
Quote from: Dwachs on January 25, 2014, 11:07:42 AM
Do these icons change size with zoom in/out?
Partially - not in order as they could in case of wrong dat file.

You can see in attached two dat files, that both are technically the same.
There is no difference (excluding object name, coords and so on).

StationParking_2_1 - menu icon is not changing
StationParking_4_1 - menu icon is changing



Both are addons for pak96.comic
Title: Re: Small buttons
Post by: Ters on January 25, 2014, 04:07:18 PM
StationParking_2_1 has a button image that is 32x32 pixels. StationParking_4_1 has a button image that is 96x58 pixels.
Title: Re: Small buttons
Post by: Dwachs on January 25, 2014, 07:22:48 PM
Quote from: The Hood on January 25, 2014, 11:30:28 AM
They are all 32x32 - which is the correct icon size for pak128.Britain.
This icon is 33px wide, the same goes for 'slice-underground view icon'.
Title: Re: Small buttons
Post by: Václav on January 25, 2014, 07:40:05 PM
Quote from: Ters on January 25, 2014, 04:07:18 PM
StationParking_2_1 has a button image that is 32x32 pixels. StationParking_4_1 has a button image that is 96x58 pixels.
It is very strange - because size you talk about, is size of cursor, not menu button.
But this atypical size of cursor have also other station extensions, that are greater than 1*1.

To you could check it, I attached also image files with menu icon and cursor.
Title: Re: Small buttons
Post by: Ters on January 25, 2014, 07:51:21 PM
Quote from: Václav on January 25, 2014, 07:40:05 PM
It is very strange - because size you talk about, is size of cursor, not menu button.

No, the cursor is 96x55 pixels. There is a stray pixel in the lower right corner of the button image, which appears to be the leftmost pixel of the cursor.
Title: Re: Small buttons
Post by: Václav on January 25, 2014, 08:51:50 PM
But originally you wrote:
Quote from: Ters on January 25, 2014, 04:07:18 PM
... StationParking_4_1 has a button image that is 96x58 pixels.
Title: Re: Small buttons
Post by: Ters on January 25, 2014, 09:01:57 PM
When I wrote that the the button image is 96x58, you wrote that that was the size of the cursor, which it wasn't. The button image is 96x58 and the cursor image is 96x55. 96+96=192, which is the width of the source image. But one pixel of the cursor isn't confined to it's half of the source image, and is therefore apparently counted as part of the button.
Title: Re: Small buttons
Post by: Václav on January 25, 2014, 10:19:12 PM
Ahh, so, I have to remake cursors to smaller size.
Title: Re: Small buttons
Post by: prissi on January 25, 2014, 10:21:24 PM
No, just removing the stray pixel should be enough.
Title: Re: Small buttons
Post by: Václav on January 26, 2014, 03:45:59 PM
Due to way in which I created sets of icon and cursor, it is a bit simplier to re-size (and improve) cursor.
Title: Re: Small buttons
Post by: prissi on January 26, 2014, 11:35:59 PM
THe cursor will not be touched by the program. The icon however will be scaled down as long as there is a stray pixel to the nearest of 32 pixel width.