Advertisement
EliteGaming

Untitled

Aug 29th, 2015
80
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.94 KB | None | 0 0
  1. os.loadAPI("button")
  2.  
  3. dial = peripheral.wrap("ep_dialling_device_2")
  4. m = peripheral.wrap("monitor_1")
  5. controller = peripheral.wrap("ep_controller_1")
  6. portalActive = false
  7. locationCount = 0
  8.  
  9. function update()
  10. portalActive = controller.isPortalActive()
  11. locationCount = dial.getStoredCount()
  12. end
  13.  
  14. function newTouchMenu()
  15. m.clear()
  16. m.setBackgroundColor(colors.black)
  17. m.setTextColor(colors.white)
  18. end
  19.  
  20. function fillTable()
  21. newTouchMenu()
  22. button.clearTable()
  23. button.setTable("HouseControl", houseControl, 4,26 ,3,6)
  24. button.setTable("N/A", na, 4,26 ,9,12)
  25. button.setTable("N/A2", na2, 4,26 ,14,17)
  26. button.setTable("Menu", mainMenu, 2,28, 19,20)
  27. print("Main Menu Filled")
  28. button.screen()
  29. end
  30.  
  31. function getClick()
  32. local event,side,x,y = os.pullEvent()
  33. if event=="monitor_touch" then
  34. button.checkxy(x,y)
  35. end
  36. end
  37.  
  38. while true do
  39. update()
  40. getClick()
  41. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement