The International Simutrans Forum

 

Author Topic: Small buttons  (Read 4013 times)

0 Members and 1 Guest are viewing this topic.

Offline The Hood

  • Devotee
  • *
  • Posts: 2889
  • pak128.Britain developer
Small buttons
« on: January 25, 2014, 10:16:39 AM »



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

Offline Václav

  • Devotee
  • *
  • Posts: 3230
  • formerly VaclavMacurek
  • Languages: CZ, EN
Re: Small buttons
« Reply #1 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.

Offline Dwachs

  • DevTeam, Coder/patcher
  • Administrator
  • *
  • Posts: 4530
  • Languages: EN, DE, AT
Re: Small buttons
« Reply #2 on: January 25, 2014, 11:07:42 AM »
Do these icons change size with zoom in/out?

Offline The Hood

  • Devotee
  • *
  • Posts: 2889
  • pak128.Britain developer
Re: Small buttons
« Reply #3 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.

Offline Dwachs

  • DevTeam, Coder/patcher
  • Administrator
  • *
  • Posts: 4530
  • Languages: EN, DE, AT
Re: Small buttons
« Reply #4 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.

Offline The Hood

  • Devotee
  • *
  • Posts: 2889
  • pak128.Britain developer
Re: Small buttons
« Reply #5 on: January 25, 2014, 11:30:28 AM »
They are all 32x32 - which is the correct icon size for pak128.Britain.

Offline Václav

  • Devotee
  • *
  • Posts: 3230
  • formerly VaclavMacurek
  • Languages: CZ, EN
Re: Small buttons
« Reply #6 on: January 25, 2014, 02:41:38 PM »
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

Offline Ters

  • Coder/patcher
  • Devotee
  • *
  • Posts: 5419
  • Languages: EN, NO
Re: Small buttons
« Reply #7 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.

Offline Dwachs

  • DevTeam, Coder/patcher
  • Administrator
  • *
  • Posts: 4530
  • Languages: EN, DE, AT
Re: Small buttons
« Reply #8 on: January 25, 2014, 07:22:48 PM »
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'.

Offline Václav

  • Devotee
  • *
  • Posts: 3230
  • formerly VaclavMacurek
  • Languages: CZ, EN
Re: Small buttons
« Reply #9 on: January 25, 2014, 07:40:05 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.

Offline Ters

  • Coder/patcher
  • Devotee
  • *
  • Posts: 5419
  • Languages: EN, NO
Re: Small buttons
« Reply #10 on: January 25, 2014, 07:51:21 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.

Offline Václav

  • Devotee
  • *
  • Posts: 3230
  • formerly VaclavMacurek
  • Languages: CZ, EN
Re: Small buttons
« Reply #11 on: January 25, 2014, 08:51:50 PM »
But originally you wrote:
... StationParking_4_1 has a button image that is 96x58 pixels.

Offline Ters

  • Coder/patcher
  • Devotee
  • *
  • Posts: 5419
  • Languages: EN, NO
Re: Small buttons
« Reply #12 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.

Offline Václav

  • Devotee
  • *
  • Posts: 3230
  • formerly VaclavMacurek
  • Languages: CZ, EN
Re: Small buttons
« Reply #13 on: January 25, 2014, 10:19:12 PM »
Ahh, so, I have to remake cursors to smaller size.

Offline prissi

  • Developer
  • Administrator
  • *
  • Posts: 9353
  • Languages: De,EN,JP
Re: Small buttons
« Reply #14 on: January 25, 2014, 10:21:24 PM »
No, just removing the stray pixel should be enough.

Offline Václav

  • Devotee
  • *
  • Posts: 3230
  • formerly VaclavMacurek
  • Languages: CZ, EN
Re: Small buttons
« Reply #15 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.

Offline prissi

  • Developer
  • Administrator
  • *
  • Posts: 9353
  • Languages: De,EN,JP
Re: Small buttons
« Reply #16 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.