Posted 29 November 2013 - 06:29 PM
Hey, I'm trying to make a click able OS so I'm using button I am making a function to help it stay neat
as I am a noob to ComputerCraft, here is my code.
as I am a noob to ComputerCraft, here is my code.
- function add(x,y,msg) – this is to set cords for button, but the msg bit does not work.
term.clear()
term.setBackgroundColor(colors.orange)
term.setCursorPos(x,y)
print " "
term.setCursorPos(x,y+1)
print " "
term.setCursorPos(x,y+2)
print (msg)
term.setCursorPos(x,y+3)
print " "
term.setCursorPos(x,y+4)
print " "
local sEvent,button,x,y = os.pullEvent("mouse_click")
if (x >=x or x<=x+7) and (y >=y or y<=y+5) then
print "hi"
end
end
function homepage()
add(2,2,Games) – This is were it doesn't work it only seems to read numbers any way to get around this.
end
Edited on 29 November 2013 - 05:34 PM