Advertisement
Guest User

startup

a guest
Mar 2nd, 2015
216
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.38 KB | None | 0 0
  1. os.loadAPI("touchpoint")
  2.  
  3. local t = touchpoint.new("back")
  4.  
  5. t:add("left", nil, 2, 2, 14, 11, colors.lime, colors.red)
  6. t:add("right", nil, 16, 2, 28, 11, colors.lime, colors.red)
  7.  
  8. t:draw()
  9.  
  10. while true do
  11.     local event, p1 = t:handleEvents(os.pullEvent())
  12.     if event == "button_click" then
  13.          t:toggleButton(p1)
  14.          rs.setOutput(p1, not rs.getOutput(p1))
  15.     end
  16. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement