Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- print("Starting..")
- os.loadAPI("touchpoint")
- local t = touchpoint.new("right")
- t:add("right", nil, 2,2,14,11,colors.red, colors.lime)
- t:draw()
- while true do
- local event p1 = t:handleEvents(os.pullEvent())
- if event == "button_click" then
- t:toggleButton(p1)
- rs.setOutput(p1, not rs.getOutput(p1))
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement