How to change the distance between gui elements
How to change the distance between gui elements
How to change the distance between gui elements. I want to shorten the distance to 0.
My native language is russian. Sorry if my messages are difficult to read.
- eradicator
- Smart Inserter
- Posts: 5211
- Joined: Tue Jul 12, 2016 9:03 am
- Contact:
Re: How to change the distance between gui elements
You have to change the padding via directly editing the style at runtime (https://lua-api.factorio.com/latest/LuaStyle.html) or defining a custom style in data stage.
Author of: Belt Planner, Hand Crank Generator, Screenshot Maker, /sudo and more.
Mod support languages: 日本語, Deutsch, English
My code in the post above is dedicated to the public domain under CC0.
Mod support languages: 日本語, Deutsch, English
My code in the post above is dedicated to the public domain under CC0.
Re: How to change the distance between gui elements
Tried to set guielement.style.xxx_padding = 0 but didn't help, I'm still having distance between elements:
EDIT: Where can I find ALL properties for EVERY SINGLE style? Looks like I miss some... Didn't find on Wiki and in APIdocs.
But earlier the same code worked just fine:
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.
Re: How to change the distance between gui elements
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.
My native language is russian. Sorry if my messages are difficult to read.
Re: How to change the distance between gui elements
Yep, I wanted to do the same, but right now found another solution making me able to use flows and frames instead of tables:
styles.lua:
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
Last edited by apriori on Sun Feb 24, 2019 1:27 pm, edited 1 time in total.
Re: How to change the distance between gui elements
We have fixed it for 0.17
Re: How to change the distance between gui elements
Klonan, hello! Where can I find ALL properties for EVERY SINGLE style? Didn't find on Wiki and in APIdocs.
Re: How to change the distance between gui elements
I have no idea where it was documented, but all this stuff you can find with viewtopic.php?f=135&t=45107