Page 1 of 1

[1.1.1] The scale parameter in icon doesn't work?

Posted: Wed Dec 02, 2020 3:13 am
by yagaodirac
icons = {
{
icon = "some file name",
icon_size = 64,
tint = {r = 0.2,g= 0.8,b=0.2,a=1}
},
{
icon ="some file name",
icon_size = 64,
scale = 0.5, ------------this 0.5 behave the same as 1, according to my eyesight.
},
} ,

I have to assign it to 0.3 to actually make it a little bit smaller than 1. But the relationship looks what 0.3 to 0.5.

Re: [1.1.1] The scale parameter in icon doesn't work?

Posted: Wed Dec 02, 2020 6:10 am
by posila
It does, but has different behavior, than in sprite definitions.
If you don't specify it, scale will be inferred based on icon_size. For icon_size = 64, the inferred scale would be 0.5 (because internally the icons are expected to be 32x32px), so setting scale = 0.5 does nothing different.

Re: [1.1.1] The scale parameter in icon doesn't work?

Posted: Wed Dec 02, 2020 6:31 am
by yagaodirac
posila wrote:
Wed Dec 02, 2020 6:10 am
It does, but has different behavior, than in sprite definitions.
If you don't specify it, scale will be inferred based on icon_size. For icon_size = 64, the inferred scale would be 0.5 (because internally the icons are expected to be 32x32px), so setting scale = 0.5 does nothing different.
Oh, interesting. I didn't test what 1 does for me in that field. So, plz add this detail into the docs. By the way, is it possible to but the sprites not from 0,0? If I prepare a circle and cut it into 4 parts, and assemble them with squares, emmm, Shapez.io with Factorio api. Good.