LuaStyle::clicked_vertical_offset is uint32, but documented as int32. Prototype docs are correct.
LuaStyle *_padding and *_margin properties are int16, but documented as int32. Prototype docs are correct, except for ScrollPaneStyleSpecification properties extra_..._when_activated.
ButtonStyleSpecification::draw_grayscale_picture defaults to false. Other optional properties are inherited from parents, and can be mandatory on root styles, but not this one.
GUI Style inconsitencies
Re: GUI Style inconsitencies
Thanks for the report, fixed for the next release. The extra ones are indeed 32 bit though, so prototype docs are all correct.
One thing I don't quite get though is your remark about draw_grayscale_picture. I can't see any special handling of that in the code, can you explain what you mean again?
One thing I don't quite get though is your remark about draw_grayscale_picture. I can't see any special handling of that in the code, can you explain what you mean again?
Re: GUI Style inconsitencies
Most properties of style specifications are marked as optional because properties that are not set are inherited from parent and root styles. And that is documented:Therenas wrote: Wed Apr 22, 2026 7:53 am One thing I don't quite get though is your remark about draw_grayscale_picture. I can't see any special handling of that in the code, can you explain what you mean again?
I think font of a LabelStyle is one example, where it is mandatory on the root style.... for root styles, some style properties are mandatory ...
As they must be specified, they can't have a default value.
But some properties are truly optional, like all the padding and margin properties. They are documented to default to 0. draw_grayscale_picture is also truly optional, but it is not specified what it defaults to.
I think its far from the only such property, but its one i encountered because it can also be set at runtime.
Here's a list of other properties that seem truly optional and don't have default specified, though i haven't verified that is the case:
https://lua-api.factorio.com/latest/typ ... underlined defaults to false
https://lua-api.factorio.com/latest/typ ... aw_borders
https://lua-api.factorio.com/latest/typ ... go_outside
https://lua-api.factorio.com/latest/typ ... r_contents
https://lua-api.factorio.com/latest/typ ... _by_search and https://lua-api.factorio.com/latest/typ ... _by_search, but those aren't really relevant to modders.
Re: GUI Style inconsitencies
Ah now I get what you mean, thanks. That is indeed quite underdocumented. I'll make sure to note the default for truly optional properties, and note on the others that they are required at least in the root style. I'll also write down the root style name while I'm at it. It'll be for 2.1 though.
Re: GUI Style inconsitencies
Thank you, it'll be useful to have for later. I already figured out most of this for what i'm working on, so i don't mind how long it takes
Re: GUI Style inconsitencies
Worked it all out for 2.1, thanks again.

