Allow multiline caption in gui elements

Place to ask discuss and request the modding support of Factorio. Don't request mods here.
User avatar
GalactusX31
Inserter
Inserter
Posts: 28
Joined: Thu Jul 20, 2017 11:27 am
Contact:

Allow multiline caption in gui elements

Post by GalactusX31 »

As the title says, it would be great to be able to use " \n " to create multiline caption for gui elements
User avatar
bobingabout
Smart Inserter
Smart Inserter
Posts: 7352
Joined: Fri May 09, 2014 1:01 pm
Contact:

Re: Allow multiline caption in gui elements

Post by bobingabout »

Yeah, I've tried this before, it just displays \n exactly as you typed it.
Creator of Bob's mods. Expanding your gameplay since version 0.9.8.
I also have a Patreon.
User avatar
Klonan
Factorio Staff
Factorio Staff
Posts: 5287
Joined: Sun Jan 11, 2015 2:09 pm
Contact:

Re: Allow multiline caption in gui elements

Post 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
User avatar
GalactusX31
Inserter
Inserter
Posts: 28
Joined: Thu Jul 20, 2017 11:27 am
Contact:

Re: Allow multiline caption in gui elements

Post 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?
Rseding91
Factorio Staff
Factorio Staff
Posts: 14345
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: Allow multiline caption in gui elements

Post 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.
If you want to get ahold of me I'm almost always on Discord.
User avatar
GalactusX31
Inserter
Inserter
Posts: 28
Joined: Thu Jul 20, 2017 11:27 am
Contact:

Re: Allow multiline caption in gui elements

Post 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
Rseding91
Factorio Staff
Factorio Staff
Posts: 14345
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: Allow multiline caption in gui elements

Post 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.
If you want to get ahold of me I'm almost always on Discord.
Post Reply

Return to “Modding interface requests”