Posted 23 July 2013 - 09:02 PM
So i'm working on a "Home integrated" OS (basically meaning it interacts with machines in my house and such using monitors and touchscreens) and i'm wondering if there's any very efficient ways to fill a screen. I want to draw a lot of different shapes on a monitor(or just a computer for now) and is there any way to quickly fill up a screen and draw buttons, etc? Im not looking for an API and ive tried various things like
local w, h = term.getSize()
term.setBackgroundcolor(colors.gray)
for h = 1,h do
for w = 1, w do
term.write(" ")
end
end
And
term.setBackgroundcolor(colors.gray)
for h = 1,3 do
for w = 1, 6 do
term.write(" ")
end
end
Any small overlooked snippets of code I could use? Because otherwise its going to add a lot of unnecessary length to the program doing that for every time I fill a screen or draw a box.