Main Menu

Weird color region

Started by robotfly, Jan 05, 2020, 04:00 AM

Previous topic - Next topic

robotfly

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

robotfly

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

Lupus590

The clear functions just print spaces and don't make any distinction between background colours