How do i show everything on the computer screen on a monitor while i use it?
I have been looking everywhere for an answer yet still not found one.
Please help,
// Oscar124
2
5 replies to this topic
#1
Posted 17 November 2014 - 05:48 PM
#2
Posted 17 November 2014 - 06:14 PM
There is not default way to do this. As far as I know, nobody has made an api that does this on CC 1.6 yet. Other than that, just make a function that writes to the monitor and the terminal at the same time, and use that in your program.
#3
Posted 17 November 2014 - 06:16 PM
KingofGamesYami, on 17 November 2014 - 06:14 PM, said:
There is not default way to do this. As far as I know, nobody has made an api that does this on CC 1.6 yet. Other than that, just make a function that writes to the monitor and the terminal at the same time, and use that in your program.
Hmm...
#4
Posted 17 November 2014 - 06:18 PM
function writeBoth( text ) mon.write( text ) term.write( text ) end function setBothCursor( x, y ) term.setCursorPos( x, y ) mon.setCursorPos( x, y ) end --#etc.
#5
Posted 17 November 2014 - 07:43 PM
Yeah..i know..
#6
Posted 17 November 2014 - 08:08 PM
I have a feeling you're already aware of this, but ... fwiw, if you're only dealing with text, I'd combine both functions into a single function like this...
I realize it's not exactly what you're looking for, but it would allow you code everything once per text/line and display it on both screens. This is definitely less efficient than KingofGamesYami's implementation if you're writing a line of text in multiple colors; but if you're only using a single color, this would reduce your code a bit more than KingofGamesYami's suggestion.
local function drawBoth(x, y, text) term.setCursorPos(x, y) term.write(text) mon.setCursorPos(x, y) mon.write(text) end drawBoth(2, 2, "Test")
I realize it's not exactly what you're looking for, but it would allow you code everything once per text/line and display it on both screens. This is definitely less efficient than KingofGamesYami's implementation if you're writing a line of text in multiple colors; but if you're only using a single color, this would reduce your code a bit more than KingofGamesYami's suggestion.
Edited by Dog, 17 November 2014 - 08:13 PM.
1 user(s) are reading this topic
0 members, 1 guests, 0 anonymous users