Jump to content


YoShIWoZ's Content

There have been 3 items by YoShIWoZ (Search limited from 10-February 22)


By content type

See this member's

Sort by                Order  

#230949 Monitor won't print text above line h-7

Posted by YoShIWoZ on 23 August 2015 - 08:51 PM in Ask a Pro

View PostDragon53535, on 23 August 2015 - 08:37 PM, said:

View PostYoShIWoZ, on 23 August 2015 - 08:21 PM, said:

--snip--
The problem with term redirect code part is that
term.restore()
Doesn't seem to exist anymore since it just calls out a nill
Term.redirect now returns the old term, so if you were to redirect to a monitor you would do this:
local curr = term.redirect(mon)
--#Back to the computer!
term.redirect(curr)
Thanks, that kind of works. :P
But now everytime i write something to the terminal (which i use for debugging, like i make it write on terminal where i click with the mouse on teh touch screen. It writes that info on the monitor instead. :P
Edit: Which actually makes sense since it's not returned to terminal, but it's returned to monitor. :P
Edit Edit: I just read on the wiki that they replaced the restore with
term.redirect(term.native()) =)



#230946 Monitor won't print text above line h-7

Posted by YoShIWoZ on 23 August 2015 - 08:21 PM in Ask a Pro

View PostHPWebcamAble, on 23 August 2015 - 05:23 PM, said:

There's a bug in CC 1.74 with monitors; Sometimes, they won't display text.

A temporary work-around is changing the text scale to a different value, then back to what you want it to be.


View PostYoShIWoZ, on 23 August 2015 - 03:26 PM, said:

As you can see i had to comment out term redirect, since this apparently doens't work anymore.

It should work... Was it giving you an error?
I downgraded to 1.73. Thanks for the tip, that fixed it! :)

The problem with term redirect code part is that
term.restore()
Doesn't seem to exist anymore since it just calls out a nill



#230927 Monitor won't print text above line h-7

Posted by YoShIWoZ on 23 August 2015 - 03:26 PM in Ask a Pro

Hey yall CC people out there, it's been quite a while since i last played with CC. So decided to boot it up on my private server running a private modpack
Which includes the newest version of CC
So i loaded my old homemade OS. Had to change a few lines of code:
function drawDesktop()
  mon.setBackgroundColor(backgroundC)
  mon.clear()
  background = paintutils.loadImage("/disk/background")  
--  term.redirect(mon)
--  paintutils.drawImage(background,-4,1)
--  term.restore()
  menuBar()
end
As you can see i had to comment out term redirect, since this apparently doens't work anymore.
Now my problem is, when i try write text to the monitor with and above monitor h-7 it simply doesn't print the text. Which seems a bit weird, because it's not even in the buttom of the block that has the monitor in it. But it's the middle of the block. So any of the text i have in my OS does not show up if it's written above line h-7 (7 lines above bottom).
I tested this out by doing a blank file with just
  mon = peripheral..wrap("top")
  mon.setTextColor(32768)
  mon.setBackgroundColor(1)
  mon.setCursorPos(1,h-1)
  mon.write(">Programs")
  mon.setCursorPos(1,h-2)
  mon.write("		 ")
  mon.setCursorPos(1,h-3)
  mon.write("		 ")
  mon.setCursorPos(1,h-4)
  mon.write("		 ")
  mon.setCursorPos(1,h-5)
  mon.write("		 ")
  mon.setCursorPos(1,h-6)		
  mon.write("Restart  ")
  mon.setCursorPos(1,h-7)
  mon.write("Shutdown ")
It writes everything up to shutdown, i even tried adding h-8 h-9 etc. same problem.

Edit: Also tried setting the curser from top, same problem:
  mon.setCursorPos(1,13)
This works fine
but
  mon.setCursorPos(1,12)
This doesn't work.