Page 1 of 1

Contents of scroll-pane.style and progressbar.style

Posted: Mon Nov 07, 2016 9:36 pm
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?

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

Posted: Mon Nov 07, 2016 9:37 pm
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

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

Posted: Tue Nov 08, 2016 6:24 am
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?

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

Posted: Tue Nov 08, 2016 7:24 am
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.

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

Posted: Tue Nov 08, 2016 12:42 pm
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.

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

Posted: Tue Nov 08, 2016 5:59 pm
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.