Gui frame flow spacing

Place to get help with not working mods / modding interface.
321freddy
Fast Inserter
Fast Inserter
Posts: 125
Joined: Fri Sep 23, 2016 10:16 pm
Contact:

Gui frame flow spacing

Post by 321freddy »

I'm trying to make a little color picker for my title bar but I cannot get the spacing on the color buttons right.
Here is what it looks like right now:
Image

As you can see the spacing between the colored buttons is a bit too wide so the surrounding frame doesn't fit in the desired width.
This is the style I use for the frame around the color buttons:

Code: Select all

data.raw["gui-style"].default["color_picker_frame_style"] =
{
	type = "frame_style",
	parent = "frame_style",
	
	left_padding = 0,
	right_padding = 0,
	top_padding = 2,
	bottom_padding = 0,
	
	horizontal_spacing = 0,
	vertical_spacing = 0,
	cell_spacing = 0,
	flow_style = {
		horizontal_spacing = 0,
		vertical_spacing = 0,
		cell_spacing = 0,
	}
}
Changing the padding works as expected but I cannot find a way to change the spacing.
horizontal_spacing and cell_spacing don't seem to do anything.

Thanks for any help :)
User avatar
Klonan
Factorio Staff
Factorio Staff
Posts: 5412
Joined: Sun Jan 11, 2015 2:09 pm
Contact:

Re: Gui frame flow spacing

Post by Klonan »

The best way i see for now if to put all the buttons in a 'table', where the spacing can be changed and adjusted at runtime
321freddy
Fast Inserter
Fast Inserter
Posts: 125
Joined: Fri Sep 23, 2016 10:16 pm
Contact:

Re: Gui frame flow spacing

Post by 321freddy »

It worked! Thanks for the quick reply! :D

Image
Post Reply

Return to “Modding help”