ComputerCraft Forums

ComputerCraft => Ask a Pro => Topic started by: robotfly on Jan 05, 2020, 04:00 AM

Title: Weird color region
Post by: robotfly on Jan 05, 2020, 04:00 AM
Hello, so forgive the really nooby question but I'm having trouble with a somwhat simple program for monitoring big reactor turbines
https://pastebin.com/kegt5xpk

All it's supposed to do is
Montor rotor speed
Have a green background behind Turbine when the turbine is on and speeding up
And red when it's off and slowing down

The same for inductor as well
However and I cant figure out why the line for inductor continues all the way across the line and I cant seem to get rid of it the Turbine indicator is working fine and the program monitors the turbine perfectly well. It's just that one bug I cant sort out.
Also I know it's really sloppily done, so criticisms are understood. Still working on streamlining, just wanted to get it working then mess with it
Title: Weird color region
Post by: robotfly on Jan 05, 2020, 11:28 PM
So I found a fix
I added
mon.setBackgroundColor(color.black)
Before each mon.clearline() and it seems to have fixed the problem
Not sure how it fixed it but it did
Title: Weird color region
Post by: Lupus590 on Jan 06, 2020, 09:15 AM
The clear functions just print spaces and don't make any distinction between background colours