What are the loaded graphic paths? [SOLVED]

Place to get help with not working mods / modding interface.
Post Reply
RiQ
Manual Inserter
Manual Inserter
Posts: 2
Joined: Thu Sep 21, 2017 8:05 am
Contact:

What are the loaded graphic paths? [SOLVED]

Post by RiQ »

Hi,

as the topic states, I would like to know what are the path strings to graphics which I can access in control.lua.

For example one I have found is:

Code: Select all

myGuiElement.sprite = "item/"..itemProto.name
Additionally I'm curious if there are separate graphics for sprites with stack amount number, or how would I go on implementing custom GUI slot element with stack numbers? Is there maybe a possibility to add some foreground layer sprite on the GUI element?

All information and help is appreciated, thanks in advance!

EDIT:

I made the problem more complicated than needed. Turns out I could throw label as a child of sprite-button and then disable it, so it wont interrupt mouse actions. Also I confirmed the sprite path syntax:
- Sprite identifier can either point to custom definition from the data, or have form "<type>/<id>", type can be (item, entity, recipe and technology), for example button.sprite = "item/iron-plate"
Last edited by RiQ on Thu Sep 21, 2017 1:43 pm, edited 1 time in total.

User avatar
darkfrei
Smart Inserter
Smart Inserter
Posts: 2903
Joined: Thu Nov 20, 2014 11:11 pm
Contact:

Re: What are the loaded graphic paths?

Post by darkfrei »

Did you read this topic?
[GUIDE] How to style buttons with images on them.
viewtopic.php?f=34&t=24007

RiQ
Manual Inserter
Manual Inserter
Posts: 2
Joined: Thu Sep 21, 2017 8:05 am
Contact:

Re: What are the loaded graphic paths?

Post by RiQ »

darkfrei wrote:Did you read this topic?
[GUIDE] How to style buttons with images on them.
viewtopic.php?f=34&t=24007
Yeah I skimmed it through several times, but I'll give it one try more with more thought put in. Thanks.

Post Reply

Return to “Modding help”