Posted 16 May 2014 - 04:24 PM
Hello, I have been recently trying to create an OS. In this OS I want the background to be in a function in order to call it whenever I want, but when I do this it never gives me the desired result. Here is the code:
local icon1 = paintutils.loadImage("Back1")
function Background()
term.setBackgroundColor(colors.lightGray)
term.clear()
paintutils.drawImage(icon1, 1, 1)
term.setCursorPos(1, 20)
term.setBackgroundColor(colours.lime)
term.setTextColor(colours.cyan)
print("Begin")
term.setBackgroundColor(colours.gray)
term.clearLine()
end
Background()
The problem is that when I do this it gets the background right but at the bottom where I want the bar with the begin to be it prints nothing + makes it completely lime + crashes the computer(in minecraft not mine ;)/> )
If you could help I would really apreciate it.
local icon1 = paintutils.loadImage("Back1")
function Background()
term.setBackgroundColor(colors.lightGray)
term.clear()
paintutils.drawImage(icon1, 1, 1)
term.setCursorPos(1, 20)
term.setBackgroundColor(colours.lime)
term.setTextColor(colours.cyan)
print("Begin")
term.setBackgroundColor(colours.gray)
term.clearLine()
end
Background()
The problem is that when I do this it gets the background right but at the bottom where I want the bar with the begin to be it prints nothing + makes it completely lime + crashes the computer(in minecraft not mine ;)/> )
If you could help I would really apreciate it.