Contents of scroll-pane.style and progressbar.style

Place to get help with not working mods / modding interface.
Post Reply
apriori
Filter Inserter
Filter Inserter
Posts: 259
Joined: Thu Feb 18, 2016 8:13 pm
Contact:

Contents of scroll-pane.style and progressbar.style

Post by apriori »

Which properies of scroll-pane and progressbar can be changed in runtime (in control.lua)?
Where can I see the full list of its properties?
Any code or mods posted by me are WTFPL, unless otherwise copyrights are specified.

User avatar
Klonan
Factorio Staff
Factorio Staff
Posts: 5150
Joined: Sun Jan 11, 2015 2:09 pm
Contact:

Re: Contents of scroll-pane.style and progressbar.style

Post by Klonan »

apriori wrote:Which properies of scroll-pane and progressbar can be changed in runtime (in control.lua)?
Where can I see the full list of its properties?

Here: http://lua-api.factorio.com/latest/LuaStyle.html

While not specific to those element types, it will error if it can't accept the style, so just trial and error them

apriori
Filter Inserter
Filter Inserter
Posts: 259
Joined: Thu Feb 18, 2016 8:13 pm
Contact:

Re: Contents of scroll-pane.style and progressbar.style

Post by apriori »

Klonan wrote: While not specific to those element types, it will error if it can't accept the style, so just trial and error them
Thanks for the reply.
As I know, smooth_color and other_smooth_colors are specific for a progressbar, but using it in a script causes "doesn't contain key" error, so I have to define styles. Is it correct?
Any code or mods posted by me are WTFPL, unless otherwise copyrights are specified.

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

Re: Contents of scroll-pane.style and progressbar.style

Post by aubergine18 »

Those progress bar color properties only exist in the prototypes (data.lua), not in the exposed GUI element objects you see in the game (control.lua).

As far as I know, only the properties listed here and here are available from control.lua, and some of them are specific to certain types of GUI element.
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.

Articulating
Long Handed Inserter
Long Handed Inserter
Posts: 71
Joined: Mon Oct 17, 2016 10:33 am
Contact:

Re: Contents of scroll-pane.style and progressbar.style

Post by Articulating »

Regarding scroll-panes do you know if it would be possible for us to set a value on a scrollbar? Would be helpful when you want a default value of at the bottom instead of at the top.

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

Re: Contents of scroll-pane.style and progressbar.style

Post by aubergine18 »

It's not possible, although there was some discussion a while back about adding ability to determine if an element is visible within a scroll panel, and also a method to make a panel scroll to show a specified element. Not sure if that's going to happen 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.

Post Reply

Return to “Modding help”