Hi,
I am working on the mod Computer core and I have a problem with the element "text-box" :
"Copy / Past" function does not work well, which makes complex script development difficult (New lines are skipped)
I guess you're already aware of this problem, but I was wondering if there was a way to circumvent it (because I have not found a solution yet) ?
And if not, will this problem always be present with the new version of the Gui provided with the 0.17?
New line in text-box Gui element
Re: New line in text-box Gui element
I've found the same problem, have you found any workaround yet?
What I use for now is the on_gui_text_changed event and check if the length is more than 10 different compared to the previous change to detect a paste action.
When it's a paste action I do a event.element.text:gsub(' ', '\n') to replace every double space to a newline.
Unfortunately tabs are also changed to a space character, so nice code indentation gets lost and turned in extra newlines.
What I use for now is the on_gui_text_changed event and check if the length is more than 10 different compared to the previous change to detect a paste action.
When it's a paste action I do a event.element.text:gsub(' ', '\n') to replace every double space to a newline.
Unfortunately tabs are also changed to a space character, so nice code indentation gets lost and turned in extra newlines.
Re: New line in text-box Gui element
Same issue at my side.
I am working on a "scriptable combinator" -> lua code into a text-box
Any solution available or other workaroud ?
I am working on a "scriptable combinator" -> lua code into a text-box
Any solution available or other workaroud ?
Re: New line in text-box Gui element
another issue is that after a few lines, the first line disappears, but only once.
(in 0.16)
(in 0.16)
creator of 55 mods
My api requests/suggestions: ui relative for overlay||Grenade arc||Player Modifiers||textbox::selection||Singleplayer RCON||disable car's ground sounds
My api requests/suggestions: ui relative for overlay||Grenade arc||Player Modifiers||textbox::selection||Singleplayer RCON||disable car's ground sounds