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?
Contents of scroll-pane.style and progressbar.style
Re: Contents of scroll-pane.style and progressbar.style
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
Thanks for the reply.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
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?
- aubergine18
- Smart Inserter
- Posts: 1264
- Joined: Fri Jul 22, 2016 8:51 pm
- Contact:
Re: Contents of scroll-pane.style and progressbar.style
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.
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.
-
- Long Handed Inserter
- Posts: 71
- Joined: Mon Oct 17, 2016 10:33 am
- Contact:
Re: Contents of scroll-pane.style and progressbar.style
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.
- aubergine18
- Smart Inserter
- Posts: 1264
- Joined: Fri Jul 22, 2016 8:51 pm
- Contact:
Re: Contents of scroll-pane.style and progressbar.style
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.