[0.18.1][Modding] Icon scaling/shifting not working
Posted: Thu Jan 23, 2020 7:41 pm
Hi,
It's me again, again with the same bug report as in 0.17.. I can not scale icons correctly:
- Scaling the icon with a scale < 1 (as in shrinking the icon) does nothing.
- Shifting the icon seems to be shifting relative to the size (changing the scale influences the shifting)
An example:
In the code above, I add 3 icons of the landfill, I scale them to be extremely tiny (10% of the original scale) and shift them over by 2 pixels (so basically they should almost appear fully on top of each other, instead I get this result:
As you can see, the icons aren't scaled at all, and the shift is way to much. I've attached this example with a save file where the item is in my inventory.
Kind regards
lovely santa
It's me again, again with the same bug report as in 0.17.. I can not scale icons correctly:
- Scaling the icon with a scale < 1 (as in shrinking the icon) does nothing.
- Shifting the icon seems to be shifting relative to the size (changing the scale influences the shifting)
An example:
Code: Select all
local compressed_landfill_scale = .1
local compressed_landfill_shift = 2
...
icons =
{
{
icon = "__base__/graphics/icons/landfill.png",
icon_size = 64, icon_mipmaps = 4,
scale = compressed_landfill_scale,
shift = {-compressed_landfill_shift, compressed_landfill_shift},
},
{
icon = "__base__/graphics/icons/landfill.png",
icon_size = 64, icon_mipmaps = 4,
scale = compressed_landfill_scale,
shift = {compressed_landfill_shift, compressed_landfill_shift},
},
{
icon = "__base__/graphics/icons/landfill.png",
icon_size = 64, icon_mipmaps = 4,
scale = compressed_landfill_scale,
shift = {0, -compressed_landfill_shift},
},
},
As you can see, the icons aren't scaled at all, and the shift is way to much. I've attached this example with a save file where the item is in my inventory.
Kind regards
lovely santa