[0.17.2] word_wrap in LuaGuiElements wrapping aggressively and inconsistently
Posted: Wed Feb 27, 2019 10:42 pm
word_wrap seems to be acting in an inconsistent and unexpected manner. It is wrapping things far too short, but the wrapping behaviour changes when the string is being changed in vivo. Further, the wrapping behaviour reverts to being aggressive when you change away from it.
Initial wrapping is aggressive:

While editing it wraps as expected:

When changing tabs back and forth the aggressive wrapping returns:

Initial wrapping is aggressive:

While editing it wraps as expected:

When changing tabs back and forth the aggressive wrapping returns:

Code: Select all
{
tab_button = function(parent)
local button = parent.add {type = 'button', name = tab_button_name, caption = "What's New"}
return button
end,
content = function(parent, player)
local read_only = not player.admin
header_label(parent, 'New Features')
local new_info_flow = parent.add {name = 'whatsNew_new_info_flow',type = 'flow'}
new_info_flow.style.horizontal_align = 'center'
local new_info_textbox =
new_info_flow.add {
type = 'text-box',
name = editable_textbox_name,
text = editable_info[new_info_key]
}
new_info_textbox.read_only = read_only
new_info_textbox.word_wrap = true
local new_info_textbox_style = new_info_textbox.style
new_info_textbox_style.width = 590
new_info_textbox_style.height = 300
Gui.set_data(new_info_textbox, new_info_key)
end
}