Let LuaGuiElements have text wrapping option

quiloos39
Manual Inserter
Manual Inserter
Posts: 2
Joined: Sat Jun 11, 2016 10:27 am
Contact:

Let LuaGuiElements have text wrapping option

Post by quiloos39 »

I think its necessary inorder to align text in textfield.
Last edited by quiloos39 on Fri May 19, 2017 5:46 pm, edited 1 time in total.
User avatar
Klonan
Factorio Staff
Factorio Staff
Posts: 5341
Joined: Sun Jan 11, 2015 2:09 pm
Contact:

Re: Let LuaGuiElements have text wrapping option

Post by Klonan »

quiloos39 wrote:I think its necessary inorder to align text.
For labels, do GuiElementLabel.single_line = false

So like:

Code: Select all

local label = game.players[1].gui.center.add{type = "label", caption = "A real long string something of which i would like to see wrap in someway instead of acting like a fool"}
label.style.maximal_width = 200
label.single_line = false
quiloos39
Manual Inserter
Manual Inserter
Posts: 2
Joined: Sat Jun 11, 2016 10:27 am
Contact:

Re: Let LuaGuiElements have text wrapping option

Post by quiloos39 »

Klonan wrote:
quiloos39 wrote:I think its necessary inorder to align text.
For labels, do GuiElementLabel.single_line = false

So like:

Code: Select all

local label = game.players[1].gui.center.add{type = "label", caption = "A real long string something of which i would like to see wrap in someway instead of acting like a fool"}
label.style.maximal_width = 200
label.single_line = false

I forget to mention its a not label its textfield
Post Reply

Return to “Implemented mod requests”