Jump to content

Transparent background

computer lua

2 replies to this topic

#1 L1nk27

  • New Members
  • 2 posts

Posted 21 June 2014 - 12: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.

Posted Image ----------> Posted Image

Edited by L1nk27, 21 June 2014 - 06:20 PM.

#2 MKlegoman357

  • Members
  • 1,170 posts
  • LocationKaunas, Lithuania

Posted 21 June 2014 - 06: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.

#3 Bomb Bloke

    Hobbyist Coder

  • Moderators
  • 7,099 posts
  • LocationTasmania (AU)

Posted 21 June 2014 - 07: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...

1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users