Posted 03 August 2012 - 05:43 PM
I have been trying to condense my REALLY long border function, but I am having trouble with the math… I want the top of the border to look like this: +———–+ But have it expanded to fit the entire screen. So far, I am dubious about the math I set up, so if anyone can help me figure this out, it would be great!
Code here:
Code here:
function border2()
term.setCursorPos(1,1)
write("+")
for 2,mX - 1 do
term.setCursorPos(mX,1)
write("-")
end
term.setCursorPos(mX,1)
write("+")
end
I do know to use
mX, mY = term.getSize()
to actually define the variables I used. I also want this scheme to wrap around the entire screen. Like this:
+--------+
| |
| |
+--------+