Icon Size

Place to get help with not working mods / modding interface.
User avatar
LuziferSenpai
Filter Inserter
Filter Inserter
Posts: 393
Joined: Tue Jul 08, 2014 10:06 am
Contact:

Icon Size

Post by LuziferSenpai »

Heyho,

can i set the Icon Size of an Icon that is in the Game smaller to use it like this?

Code: Select all

icons = { { icon = pipe.icon, tint = { r = 1, g = 1, b = 1, a = 1 } }, { icon = MODNAME.."/graphics/"..sides..".png", tint = { r = 1, g = 1, b = 1, a = 0.85 } } }
But with the first Icon a bit smaller?

Greetz,

Luzifer
Coding is awesome!
Animes are love!
Factorio is life!

My MODs:
Click

Greetz,

Senpai
User avatar
aubergine18
Smart Inserter
Smart Inserter
Posts: 1264
Joined: Fri Jul 22, 2016 8:51 pm
Contact:

Re: Icon Size

Post by aubergine18 »

I think the resizing can only happen later, when the icon/image is used in GUI etc.
Better forum search for modders: Enclose your search term in quotes, eg. "font_color" or "custom-input" - it prevents the forum search from splitting on hypens and underscores, resulting in much more accurate results.
User avatar
LuziferSenpai
Filter Inserter
Filter Inserter
Posts: 393
Joined: Tue Jul 08, 2014 10:06 am
Contact:

Re: Icon Size

Post by LuziferSenpai »

aubergine18 wrote:I think the resizing can only happen later, when the icon/image is used in GUI etc.
So no way i make it how i wanted it?
Coding is awesome!
Animes are love!
Factorio is life!

My MODs:
Click

Greetz,

Senpai
User avatar
aubergine18
Smart Inserter
Smart Inserter
Posts: 1264
Joined: Fri Jul 22, 2016 8:51 pm
Contact:

Re: Icon Size

Post by aubergine18 »

Not in the prototypes, that I know of. However, some image definitions have a `scale` property that might possibly do what you're after? Eg. `scale = 0.5` would possibly give half size image. Have a search through the base and core prototypes and you should see some examples. I'm not sure how or if it works though.
Better forum search for modders: Enclose your search term in quotes, eg. "font_color" or "custom-input" - it prevents the forum search from splitting on hypens and underscores, resulting in much more accurate results.
User avatar
LuziferSenpai
Filter Inserter
Filter Inserter
Posts: 393
Joined: Tue Jul 08, 2014 10:06 am
Contact:

Re: Icon Size

Post by LuziferSenpai »

aubergine18 wrote:Not in the prototypes, that I know of. However, some image definitions have a `scale` property that might possibly do what you're after? Eg. `scale = 0.5` would possibly give half size image. Have a search through the base and core prototypes and you should see some examples. I'm not sure how or if it works though.
I only wanted to created a MOD like my Straight Pipes MOD.

I make for every Item in the Game a Recipe for each each of the Virtual-Signals.

With a function that is easy, but than you dont see good that it is a Signal.
Coding is awesome!
Animes are love!
Factorio is life!

My MODs:
Click

Greetz,

Senpai
Post Reply

Return to “Modding help”