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

[Question] Headline

Started by nO_OnE, 13 December 2012 - 04:05 AM
nO_OnE #1
Posted 13 December 2012 - 05:05 AM
Simple Question:

I have some program which has a simple output in lines like:

doing some stuff... - done
doing some other stuff... - done
doing more recent stuff...

and the thing I wanted to do was a headline like a line which would not vanish in the upper corner of the screen after the screen is full with text and a new line is added, like:

[Cool Headline]
---------------
doing some stuff... - done
doing some other stuff... - done
doing more recent stuff...

Anyone able to teach me how to do this?
bjornir90 #2
Posted 13 December 2012 - 07:07 AM
You need to use term.setCursorPos(x, y)
Leo Verto #3
Posted 13 December 2012 - 07:31 AM
The easiest way of doing this would probably be rewriting the headline every time you print something.
But I suggest taking a look at the term API on the wiki instead.
nO_OnE #4
Posted 13 December 2012 - 08:26 AM
Yes I thought about rewriting it every time but I wondered if there is another way because this seemed kind of dumb to me in the first place… Thank you very much anyhow ;)/>
PS: one question, which of the term commands are only available since 1.4? I can't remember some of the commands listed in the wikki… (I'm 1.3 user because of tekkit)

Edit: Figured out by myself, it's only the isColor and the setColor, I simply overread the other things. My fault!