Page 1 of 1

What GUI element dose the production statistics panel use?

Posted: Tue Mar 12, 2019 6:06 am
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 1048 times
pale.PNG
pale.PNG (10.98 KiB) Viewed 1048 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.

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

Posted: Tue Mar 12, 2019 6:30 am
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.

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

Posted: Wed Mar 13, 2019 7:59 am
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?