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

Transparent background

Started by L1nk27, 21 June 2014 - 11:09 AM
L1nk27 #1
Posted 21 June 2014 - 01:09 PM
I momently write an PDA OS and would add an Lockscreen with an Passcode and an Background.
The Problem is i would add an Text, which Background should look like the pixels behind the Text, so that the background is transparent.

———->
Edited on 21 June 2014 - 05:20 PM
MKlegoman357 #2
Posted 21 June 2014 - 07:39 PM
It is really hard to tell why your code is not working without seeing it. But I think I know where your problem may be. You cannot make the background 'transparent' but you can set the background color to whatever color you want before you write the text.
Bomb Bloke #3
Posted 21 June 2014 - 08:46 PM
The catch is working out what colour was previously set at the screen location in concern.

There's no function built into ComputerCraft that'll give you that information - that said, it's certainly possible to keep track of what colours your script has already drawn to the screen…