Page 1 of 1

Syle conversion issues

Posted: Mon Mar 11, 2019 4:52 pm
by Iccor56
so i am trying to update the mods i have to run on .017 that the makers have not updated.

i keep running in to gui-style issues but i simply can not find the current list of style options or how to define them. does anyone have a suggestion or a place to look?


all of these work fine until i enable smart display redux which displays the count of a single circuit signal
Untitled.png
Untitled.png (20.27 KiB) Viewed 994 times

Code: Select all

default_gui.smadisp_textfield_style =
{
    type = "textfield_style",
	font="smadisp_font_bold",
	align = "left",
    font_color = {},
	default_font_color={r=1, g=1, b=1},
	hovered_font_color={r=1, g=1, b=1},
    selection_background_color= {r=0.66, g=0.7, b=0.83},
	top_padding = 0,
	bottom_padding = 0,
	left_padding = 0,
	right_padding = spacing_right,
	minimal_width = 200,
	maximal_width = 200,
	graphical_set =
	{
		type = "composition",
		filename = "__core__/graphics/gui.png",
		priority = "extra-high-no-scale",
		corner_size = {3, 3},
		position = {16, 0}
	},
}    
  

Re: Syle conversion issues

Posted: Tue Mar 12, 2019 9:18 am
by Therenas
From looking at the style prototypes of the base game, I would say that textfield_style does not exist anymore, you should use textbox_style instead, even for textfields.

Re: Syle conversion issues

Posted: Tue Mar 12, 2019 9:48 am
by eduran
Iccor56 wrote: Mon Mar 11, 2019 4:52 pm i keep running in to gui-style issues but i simply can not find the current list of style options or how to define them. does anyone have a suggestion or a place to look?
There is no official documentation available, currently UI modders have to resort to trial-and-error. Feel free to add your complaint to mine: viewtopic.php?f=28&t=66574 ;)

In your case: change textfield_style to textbox_style. 'type = "composition",' and 'priority = "extra-high-no-scale",' are probably unnecessary. If those lines give you any errors just remove them. Also, the UI will look different with 0.17 and might need additional work beyond just getting it to launch.