Page 1 of 1

Allow multiline caption in gui elements

Posted: Sun Mar 11, 2018 4:06 pm
by GalactusX31
As the title says, it would be great to be able to use " \n " to create multiline caption for gui elements

Re: Allow multiline caption in gui elements

Posted: Mon Mar 12, 2018 9:20 am
by bobingabout
Yeah, I've tried this before, it just displays \n exactly as you typed it.

Re: Allow multiline caption in gui elements

Posted: Mon Mar 12, 2018 10:01 am
by Klonan
GalactusX31 wrote:As the title says, it would be great to be able to use " \n " to create multiline caption for gui elements
You need to set the label style to allow multiline:
http://lua-api.factorio.com/latest/LuaS ... ingle_line

Image

Re: Allow multiline caption in gui elements

Posted: Wed Mar 14, 2018 5:17 pm
by GalactusX31
Thank you very much, this info solve my big headache

Does this work in the same way for the caption of the buttons?

Re: Allow multiline caption in gui elements

Posted: Thu Mar 15, 2018 1:53 am
by Rseding91
GalactusX31 wrote:Thank you very much, this info solve my big headache

Does this work in the same way for the caption of the buttons?
No, buttons don't support multiline text.

Re: Allow multiline caption in gui elements

Posted: Thu Mar 15, 2018 3:49 am
by GalactusX31
Is there any chance that this property will be added to the gui buttons as well in the future?

and if you can not, is there any way to "emulate" the multiline in the caption of the buttons? I would appreciate being told how it is, thanks

Re: Allow multiline caption in gui elements

Posted: Thu Mar 15, 2018 10:05 am
by Rseding91
GalactusX31 wrote:Is there any chance that this property will be added to the gui buttons as well in the future?

and if you can not, is there any way to "emulate" the multiline in the caption of the buttons? I would appreciate being told how it is, thanks
Most likely no. Multi-line text adds a lot of overhead to a widget when buttons never need it in the base game.