Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- os.loadAPI("button")
- dial = peripheral.wrap("ep_dialling_device_2")
- m = peripheral.wrap("monitor_1")
- controller = peripheral.wrap("ep_controller_1")
- portalActive = false
- locationCount = 0
- function update()
- portalActive = controller.isPortalActive()
- locationCount = dial.getStoredCount()
- end
- function newTouchMenu()
- m.clear()
- m.setBackgroundColor(colors.black)
- m.setTextColor(colors.white)
- end
- function fillTable()
- newTouchMenu()
- button.clearTable()
- button.setTable("HouseControl", houseControl, 4,26 ,3,6)
- button.setTable("N/A", na, 4,26 ,9,12)
- button.setTable("N/A2", na2, 4,26 ,14,17)
- button.setTable("Menu", mainMenu, 2,28, 19,20)
- print("Main Menu Filled")
- button.screen()
- end
- function getClick()
- local event,side,x,y = os.pullEvent()
- if event=="monitor_touch" then
- button.checkxy(x,y)
- end
- end
- while true do
- update()
- getClick()
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement