This is a read-only snapshot of the ComputerCraft forums, taken in April 2020.
johnnic's profile picture

print(var) not printing correctly after using paintutils

Started by johnnic, 23 June 2013 - 09:14 PM
johnnic #1
Posted 23 June 2013 - 11:14 PM
Hi there. I am trying to make an API and one of those functions would be to create a text box. The function I am trying to use is comTextBox(), but the image shows what happens.
[attachment=1217:2013-06-23_22.12.01.png]
Here is the link to the API: http://pastebin.com/BkbjSyja
Thanks in advance!
Grim Reaper #2
Posted 24 June 2013 - 01:35 AM
Your problem probably comes from some behavior in the built in 'print' function, so I would recommend that you just use 'term.write (text)' instead.
Also, you'll want to make sure that your setting your text and background colors back to what you want them to be (if paintUtils doesn't do that already).
johnnic #3
Posted 24 June 2013 - 09:20 AM
Your problem probably comes from some behavior in the built in 'print' function, so I would recommend that you just use 'term.write (text)' instead.
Also, you'll want to make sure that your setting your text and background colors back to what you want them to be (if paintUtils doesn't do that already).

Got the same result.
Pharap #4
Posted 24 June 2013 - 09:48 AM
I don't get what you're trying to do exactly. Are you trying to put the too long message in the text box or get the read to be reading from in the text box?
johnnic #5
Posted 24 June 2013 - 10:14 AM
I am trying to have the person make a box, then be able to add text inside it based on the io.read().
johnnic #6
Posted 24 June 2013 - 10:17 AM
I fixed it. Looks like paintutils set the background color to while, so i used
term.setBackgroundColor(colors.black)
and that fixed it.