What GUI element dose the production statistics panel use?

Place to get help with not working mods / modding interface.
EthanKing
Manual Inserter
Manual Inserter
Posts: 3
Joined: Tue Feb 19, 2019 3:05 pm
Contact:

What GUI element dose the production statistics panel use?

Post by EthanKing »

I'm creating my first mod for factorio and I want a button that is exact the same as the 'button' production statistics panel uses.
It looks like
color.PNG
color.PNG (12 KiB) Viewed 1046 times
pale.PNG
pale.PNG (10.98 KiB) Viewed 1046 times

The exact functions I need are:
1. Displaying pictures
2. Clickable
3. Able to change the picture when clicked

I understand that I can implement it with a sprite-button and prepared pictures. But since there is already such a thing like that, I want to know what GUI element it uses and what properties should be set.
Bilka
Factorio Staff
Factorio Staff
Posts: 3470
Joined: Sat Aug 13, 2016 9:20 am
Contact:

Re: What GUI element dose the production statistics panel use?

Post by Bilka »

The base game GUI uses completely different GUI elements than the mod GUI. So, knowing what the base game uses really wont help you. Ctrl + F6, then hover over the element will tell you though:
Image


What might help you to know, is that the styles that are used in the vanilla GUI are accessible to you so you can use those. Furthermore, in this specific case a choose-elem-button might also work for you.
I'm an admin over at https://wiki.factorio.com. Feel free to contact me if there's anything wrong (or right) with it.
EthanKing
Manual Inserter
Manual Inserter
Posts: 3
Joined: Tue Feb 19, 2019 3:05 pm
Contact:

Re: What GUI element dose the production statistics panel use?

Post by EthanKing »

Thanks Bilka a lot. And I have another question: Can I access the pale version of pictures of items in control.lua or there is a style to set about it?
Post Reply

Return to “Modding help”