Style booleans - "on" vs "true"
Posted: Tue Oct 01, 2019 6:58 pm
hi,
I'm confused about the following style properties...
LuaStyle.horizontally_stretchable
LuaStyle.stretch_image_to_widget_size
Both are defined boolean, but horizontally_stretchable expects "on" and stretch_image_to_widget_size expects true.
The above code works, but if I change horizontally_stretchable to true, I get load error:
Unknown stretch rule value
Why is this!?
I'm confused about the following style properties...
LuaStyle.horizontally_stretchable
LuaStyle.stretch_image_to_widget_size
Both are defined boolean, but horizontally_stretchable expects "on" and stretch_image_to_widget_size expects true.
Code: Select all
local style = data.raw["gui-style"].default
style.style_Beast_button_stretch =
{
type = "button_style",
horizontally_stretchable = "on",
}
style.style_test_image =
{
type = "image_style",
stretch_image_to_widget_size = true,
}
Unknown stretch rule value
Why is this!?