Advertisement
Derek1017

Redstone

Jan 17th, 2015
268
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.77 KB | None | 0 0
  1. os.unloadAPI ("bundleAPI")
  2. os.loadAPI ("bundleAPI")
  3.  
  4. mon = peripheral.wrap("left")
  5.  
  6. mon.clear()
  7. mon.setCursorPos(5,1)
  8. mon.setTextColor(1)
  9. mon.write("Header on line 1")
  10. mon.setCursorPos(1,2)
  11. mon.write("Please choose an option:")
  12. mon.setCursorPos(1,3)
  13. mon.setTextColor(8)
  14. mon.write("Option1")
  15. mon.setCursorPos(1,4)
  16. mon.setTextColor(4)
  17. mon.write("Option2")
  18.  
  19. while true do
  20. event, side, xPos, yPos = os.pullEvent("monitor_touch")
  21. if (yPos) == 3 then
  22. bundleAPI.off("bottom","white")
  23. mon.setCursorPos(4,11)
  24. mon.setTextColor(16)
  25. mon.write("Selected Option1)
  26. elseif (yPos) == 4 then
  27. bundleAPI.on("bottom","white")
  28. mon.setCursorPos(4,11)
  29. mon.setTextColor(16)
  30. mon.write("Selected Option2")
  31. end
  32. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement