How to change the distance between gui elements
Posted: Mon Nov 19, 2018 4:29 pm
How to change the distance between gui elements. I want to shorten the distance to 0.
www.factorio.com
https://forums.factorio.com/
I solved the problem by adding buttons to the table. And changing the vertical_spacing and horizontal_spacing to 0 But I still hope that in 0.17 it can be made easier.apriori wrote: Sat Feb 23, 2019 7:47 pm Tried to set guielement.style.xxx_padding = 0 but didn't help, I'm still having distance between elements:
2019-02-23_22-49-31.png
But earlier the same code worked just fine:
2019-02-23_22-52-07.png
EDIT: I add buttons to a flow. Tried to set paddings of both a flow and buttons, but it didn't work.
EDIT: Where can I find ALL properties for EVERY SINGLE style? Looks like I miss some... Didn't find on Wiki and in APIdocs.
Yep, I wanted to do the same, but right now found another solution making me able to use flows and frames instead of tables:WIZ4 wrote: Sun Feb 24, 2019 12:42 pm I solved the problem by adding buttons to the table. And changing the vertical_spacing and horizontal_spacing to 0
But I still hope that in 0.17 it can be made easier.
Code: Select all
data.raw["gui-style"].default["teleportation_thin_flow_hor"] = {
type = "horizontal_flow_style",
horizontal_spacing = 0,
resize_row_to_width = true
}
data.raw["gui-style"].default["teleportation_thin_flow_ver"] = {
type = "vertical_flow_style",
vertical_spacing = 0,
resize_row_to_height = true
}
Code: Select all
flowElement.style.horizontal_spacing = 0
We have fixed it for 0.17apriori wrote: Sun Feb 24, 2019 1:22 pm I'm sure it's a dev's mistake, but it is and I have to work with it.
Klonan, hello! Where can I find ALL properties for EVERY SINGLE style? Didn't find on Wiki and in APIdocs.
I have no idea where it was documented, but all this stuff you can find with viewtopic.php?f=135&t=45107apriori wrote: Sun Feb 24, 2019 2:02 pm Klonan, hello! Where can I find ALL properties for EVERY SINGLE style? Didn't find on Wiki and in APIdocs.