Advertisement
Etsukazu_Aoi

test button 1.0

Feb 6th, 2016
73
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.50 KB | None | 0 0
  1. os.loadAPI("button")
  2. monitor = peripheral.wrap("top")
  3.  
  4.  
  5. function gotoln()
  6. local x, y = monitor.getCursorPos()
  7. if y1 == y then
  8. monitor.scroll(1)
  9. monitor.setCursorPos(1, y)
  10. else
  11. monitor.setCursorPos(1, y+1)
  12. end
  13. end
  14.  
  15. function button1() button.toggleButton("open")
  16.  
  17. end
  18.  
  19. function ecran()
  20. button.setTable("open",button1,8,25,3,3)
  21. button.screen()
  22. end
  23.  
  24. function getClick()
  25. event,side,x,y = os.pullEvent("monitor_touch")
  26. button.checkxy(x,y)
  27. end
  28.  
  29. ecran()
  30.  
  31. while true do getClick() end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement