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

Text erases paint.

Started by jackolama, 10 December 2014 - 05:06 PM
jackolama #1
Posted 10 December 2014 - 06:06 PM
I am trying to make a simple DOS. And i put a picture in the backround for it…. But my text erases the picture…is there anyway to make the picture not get erased by text?
Bomb Bloke #2
Posted 10 December 2014 - 07:27 PM
No. But pictures are generally formed by writing spaces while using specific background colours - if you keep track of which background colours were used where, then you can rig up a system to use those same background colours when you write new text to those locations.
syfygirl #3
Posted 10 December 2014 - 09:26 PM
I am trying to make a simple DOS. And i put a picture in the backround for it…. But my text erases the picture…is there anyway to make the picture not get erased by text?

Well you could keep a table of colors for each pixel in the background pixel.

And then write a function to write text, so that it gets the current screen position send that position to the table, table returns color, set backgroundcolor, write text, with that you have the ability to write text on a background.