Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- os.unloadAPI ("bundleAPI")
- os.loadAPI ("bundleAPI")
- mon = peripheral.wrap("left")
- mon.clear()
- mon.setCursorPos(5,1)
- mon.setTextColor(1)
- mon.write("Header on line 1")
- mon.setCursorPos(1,2)
- mon.write("Please choose an option:")
- mon.setCursorPos(1,3)
- mon.setTextColor(8)
- mon.write("Option1")
- mon.setCursorPos(1,4)
- mon.setTextColor(4)
- mon.write("Option2")
- while true do
- event, side, xPos, yPos = os.pullEvent("monitor_touch")
- if (yPos) == 3 then
- bundleAPI.off("bottom","white")
- mon.setCursorPos(4,11)
- mon.setTextColor(16)
- mon.write("Selected Option1)
- elseif (yPos) == 4 then
- bundleAPI.on("bottom","white")
- mon.setCursorPos(4,11)
- mon.setTextColor(16)
- mon.write("Selected Option2")
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement